From a00f2386cd0e504892abb4af6cfe2f5c8502105f Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期三, 07 八月 2024 13:40:46 +0800
Subject: [PATCH] 1.递交
---
src/views/workOrder/workOrderList.vue | 138 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 128 insertions(+), 10 deletions(-)
diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index 4afa633..ab7f027 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -135,6 +135,8 @@
:data="tableData"
:height="isExpandForm?tableHeight:(tableHeight+80)+'px'"
border
+ :summary-method="getSummaries"
+ show-summary
:row-class-name="tableRowClassName"
:style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+80)+'px'}"
highlight-current-row
@@ -357,7 +359,7 @@
v-if="mesSetting.workOrder"
class="el-icon-files"
style="cursor: pointer;color:#42b983;margin-right: 15px"
- @click="pre(row,1)"
+ @click.stop="pre(row,1)"
/>
</el-tooltip>
@@ -365,12 +367,12 @@
<i
class="el-icon-edit-outline"
:style="{color:$store.state.settings.theme}"
- @click="edit('edit',row)"
+ @click.stop="edit('edit',row)"
/>
</el-tooltip>
<el-tooltip v-del-tab-index class="item" effect="dark" content="鍒犻櫎" placement="top">
- <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click="del(row)" />
+ <i class="el-icon-delete" :style="{color:$store.state.settings.theme}" @click.stop="del(row)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ崟" placement="top">
@@ -383,7 +385,7 @@
:style="{color:$store.state.settings.theme}"
class="el-icon-printer"
style="cursor: pointer;margin-right: 15px"
- @click="handlePrint(row.wo_code,row.saleOrderCod)"
+ @click.stop="handlePrint(row.wo_code,row.saleOrderCod)"
/>
</el-tooltip>
@@ -392,7 +394,7 @@
class="el-icon-view"
style="cursor: pointer;"
:style="{color:$store.state.settings.theme}"
- @click="edit('view',row)"
+ @click.stop="edit('view',row)"
/>
</el-tooltip>
@@ -765,6 +767,91 @@
:cell-style="this.$cellStyle"
row-key="stepcode"
>
+ <el-table-column type="expand">
+ <template slot-scope="props">
+
+ <el-table
+ :data="props.row.children"
+ style="width: 96%;margin: auto;"
+ border
+ :row-class-name="tableRowClassName"
+ >
+ <el-table-column
+ prop="eqp_code"
+ label="璁惧/寰�鏉ョ紪鐮�"
+ min-width="120"
+ />
+ <el-table-column
+ prop="eqp_name"
+ label="璁惧/寰�鏉ュ悕绉�"
+ min-width="120"
+ />
+ <el-table-column
+ prop="eqp_value"
+ label="璁惧鑺傛媿"
+ min-width="150"
+ >
+ <template slot-scope="{row}">
+ <div style="display: flex;align-items: center">
+ <el-input
+ v-model="row.eqp_value"
+ placeholder="璇疯緭鍏�"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ @change="val=>eqpValueChange(val,row)"
+ />
+ <div style="margin-left: 5px">绉�</div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="stand_value"
+ label="鐢熶骇鑺傛媿"
+ min-width="120"
+ >
+ <template slot-scope="{row}">
+ <div>{{ row.stand_value + ' ' + '绉�/娆�' }}</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="cavity_qty"
+ label="鑵斿瀷鏁�"
+ min-width="120"
+ >
+ <template slot-scope="{row}">
+ <el-input
+ v-model="row.cavity_qty"
+ placeholder="璇疯緭鍏�"
+ oninput="value=value.replace(/[^0-9.]/g,'')"
+ @change="val=>cavityQtyChange(val,row)"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="unprice"
+ label="宸ュ簭宸ヤ环"
+ min-width="120"
+ >
+ <template slot-scope="{row}">
+ <el-input v-model="row.unprice" oninput="value=value.replace(/[^0-9.]/g,'')" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="enable"
+ label="鏄惁鍚敤"
+ min-width="150"
+ >
+ <template slot-scope="{row}">
+ <el-switch
+ v-model="row.enable"
+ inactive-value="N"
+ active-value="Y"
+ />
+ </template>
+ </el-table-column>
+ </el-table>
+ </template>
+ </el-table-column>
+
<el-table-column
type="index"
label="搴忓彿"
@@ -791,7 +878,6 @@
placeholder="璇疯緭鍏ュ伐搴忓崟浠�"
oninput="value=value.replace(/[^0-9.]/g,'')"
style="width: 100%"
- @click=""
/>
</template>
</el-table-column>
@@ -2183,7 +2269,7 @@
<el-dialog
v-el-drag-dialog
class="sop"
- title="璁惧SOP棰勮"
+ title="SOP棰勮"
:visible.sync="SopDialogVisible"
width="800px"
:close-on-click-modal="false"
@@ -2773,7 +2859,7 @@
this.operation = operation
this.dialogVisible = true
this.dialogForm.data_sources = 'MES'
-
+ this.sourceType = true
this.$nextTick(() => {
this.setSort()
})
@@ -2880,7 +2966,7 @@
this.dialogForm.mesmaxqty = res.canupdate_qty
if (this.mesSetting.route) { // 鎸夊伐鑹鸿矾绾胯蛋妯″紡
- if (!this.dialogForm.routecode) {
+ if (this.dialogForm.routecode) {
await this.getPartcodeChangeDialog()
}
@@ -2895,6 +2981,7 @@
)
})
this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ this.sourceType = true
} else {
const data2 = {
wkshopcode: this.dialogForm.wkshopcode,
@@ -2912,6 +2999,7 @@
)
})
this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ this.sourceType = false
}
}
} else {
@@ -2926,7 +3014,9 @@
)
})
this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ this.sourceType = true
} else {
+ this.sourceType = false
await this.getBasicProcessData()
}
}
@@ -3003,7 +3093,7 @@
res.forEach(i => {
this.stepTableData.push(
{
- stepcode: i.step_code,
+ stepcode: i.code,
// stepname: i.stepname,
stepprice: i.unprice
}
@@ -3657,6 +3747,34 @@
},
stepSelectedValueChange(val) {
// console.log(val, 123)
+ },
+ getSummaries(param) {
+ const { columns, data } = param
+ const sums = []
+ const i = 9
+ columns.forEach((column, index) => {
+ if (index === i) {
+ sums[index] = '鎬绘暟'
+ return
+ }
+ const values = data.map(item => Number(item[column.property]))
+ if (column.property === 'plan_qty') {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return prev + curr
+ // return Math.round(prev * 100) / 100 + Math.round(curr * 100) / 100
+ }
+ }, 0)
+
+ sums[index] += ''
+ }
+ })
+
+ this.$nextTick(() => {
+ this.$refs.tableDataRef.doLayout()
+ })
+ return sums
}
}
}
--
Gitblit v1.9.3