From 6533c141c2bdad73219a7ecec02186a833820e55 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 07 十二月 2023 17:30:32 +0800
Subject: [PATCH] 修复bug
---
src/views/plan/manufacturingorder/productorder-form.vue | 135 ++++++++++++++++++++++----------------------
1 files changed, 67 insertions(+), 68 deletions(-)
diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index 039af71..d4fcf52 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -8,7 +8,7 @@
</div>
<div class="btn-group header-right" v-if="editable">
<el-button :disabled="isSubmit" v-thinclick="`dataFormSubmit`"
- >淇濆瓨</el-button
+ type="primary">淇濆瓨</el-button
>
</div>
</div>
@@ -126,7 +126,6 @@
</el-form-item>
</el-col>
</el-row>
-
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="澶囨敞" prop="remark">
@@ -151,39 +150,37 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-col
- :span="8"
- v-if="permissions.plan_manufacturingorder_bom_sure"
- >
- <el-form-item label="BOM纭">
- <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="permissions.plan_manufacturingorder_process_sure"
- >
- <el-form-item label="宸ヨ壓纭">
- <el-switch v-model="dataForm.processConfirmStatus">
- </el-switch>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="permissions.plan_manufacturingorder_test_sure"
- >
- <el-form-item label="妫�娴嬫爣鍑嗙‘璁�">
- <el-switch v-model="dataForm.standardConfirmStatus">
- </el-switch>
- </el-form-item>
- </el-col>
+ <el-col
+ :span="2"
+ v-if="permissions.plan_manufacturingorder_bom_sure"
+ >
+ <el-form-item label="BOM纭" label-width="110px">
+ <el-switch v-model="dataForm.bomConfirmStatus"> </el-switch>
+ </el-form-item>
</el-col>
- <el-col :span="4">
+ <el-col
+ :span="2"
+ v-if="permissions.plan_manufacturingorder_process_sure"
+ >
+ <el-form-item label="宸ヨ壓纭" label-width="110px">
+ <el-switch v-model="dataForm.processConfirmStatus">
+ </el-switch>
+ </el-form-item>
+ </el-col>
+ <el-col
+ :span="2"
+ v-if="permissions.plan_manufacturingorder_test_sure"
+ >
+ <el-form-item label="妫�娴嬫爣鍑嗙‘璁�" label-width="140px">
+ <el-switch v-model="dataForm.standardConfirmStatus">
+ </el-switch>
+ </el-form-item>
+ </el-col>
+ <el-col :span="2">
<el-form-item
label="IFS杞﹂棿璁㈠崟鎺ユ敹鏃舵姤鍛婂伐搴�"
prop="isReportOperation"
- label-width="200px"
+ label-width="250px"
>
<el-switch v-model="dataForm.isReportOperation" disabled>
</el-switch>
@@ -595,8 +592,19 @@
<el-tab-pane label="浜у搧缁撴瀯" id="ta1" key="ta1" name="ta1">
<el-row>
- <el-col :span="11">
- <el-form-item label="瀹屾暣BOM">
+ <el-col :span="2" style="text-align: center">
+ <el-button
+ type="text"
+ size="small"
+ icon="el-icon-circle-plus-outline"
+ style="color:#f56c6c;"
+ :disabled="!dataForm.id"
+ @click="addStruct()"
+ >娣诲姞鍏冪礌
+ </el-button>
+ </el-col>
+ <el-col :offset="11" :span="11">
+ <!-- <el-form-item label="瀹屾暣BOM">
<el-select
@change="bomSelectChanged"
disabled
@@ -622,35 +630,18 @@
>
</el-option>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :offset="11" :span="2" style="text-align: center">
- <el-button
- type="text"
- size="small"
- icon="el-icon-circle-plus-outline"
- style="color:#f56c6c;"
- :disabled="!dataForm.id"
- @click="addStruct()"
- >娣诲姞鍏冪礌
- </el-button>
+ </el-form-item> -->
</el-col>
</el-row>
<el-row>
<el-table
- default-expand-all
- :data="components"
+ :data="components[0]"
@selection-change="structSelectionChange"
- row-key="id"
border
- :tree-props="{
- children: 'children'
- }"
style="width: 100%"
height="400px"
- :default-sort="{ prop: 'index' }"
>
- <el-table-column type="selection" width="40" fixed="left" />
+ <!-- <el-table-column type="selection" width="40" fixed="left" /> -->
<el-table-column
type="index"
width="50"
@@ -668,7 +659,7 @@
/>
<el-table-column
prop="partName"
- width=""
+ width="200"
header-align="center"
align="left"
label="闆朵欢"
@@ -1071,6 +1062,7 @@
data() {
return {
+ componentsTable:[],
typeOptions: [],
paramTemplateSelArr: [],
paramTemplateSelCol: 'operationTemplateNo',
@@ -1232,6 +1224,7 @@
this.getBomTypeDbOptions()
this.getManufactureAttrs('manufacture_attr_type')
this.getSysParam(sysParam.IS_REPORT_OPERATION)
+ // console.log(this.components);
},
watch: {
'dataForm.partId'(newValue, oldValue) {
@@ -1245,7 +1238,11 @@
}
}
},
-
+ components(newVal,oldVal){
+ console.log("鏂�",newVal);
+ console.log("鑰�",oldVal);
+ console.log(this.components);
+ },
currentRouting(newValue, oldValue) {
if (newValue && newValue.id) {
if (this.dataForm.id != null && this.dataForm.id !== 0) {
@@ -1295,7 +1292,8 @@
if (newValue && newValue.id) {
// 鏌ヨ浜у搧缁撴瀯瀵瑰簲鐨勭粍浠�
getBom(newValue.id).then((response) => {
- this.components = [response.data.data.tree]
+ console.log("鏌�",this.components);
+ // this.components = [response.data.data.tree]
})
}
},
@@ -1397,6 +1395,7 @@
},
// 鏌ヨ褰撳墠杞﹂棿璁㈠崟淇℃伅
getOrderInfo() {
+ let that=this
getManufacturingOrder(this.dataForm.id).then((response) => {
this.dataForm = response.data.data
// 鎶婂伐鑹烘寕涓婂幓
@@ -1416,7 +1415,7 @@
}
// 鎶婁骇鍝佺粨鏋勭粍浠舵寕涓婂幓
if (this.dataForm.bomRoot) {
- this.components = [this.dataForm.bomRoot]
+ that.components = [this.dataForm.bomRoot]
}
})
},
@@ -2105,17 +2104,17 @@
},
// 鎵撳紑bom鑺傜偣
addStruct() {
- if (this.structSelection.length <= 0) {
- this.$message.error('璇烽�夋嫨闇�瑕佹坊鍔犲厓绱犵殑鑺傜偣')
- } else {
- if (this.structSelection.length === 1) {
- this.selectedStruct = this.structSelection[0]
- this.moId = this.dataForm.id
- this.showStructForm = true
- } else {
- this.$message.error('鍙兘涓哄崟涓妭鐐规坊鍔犲厓绱�')
- }
- }
+ this.selectedStruct = this.structSelection[0]
+ this.moId = this.dataForm.id
+ this.showStructForm = true
+ // if (this.structSelection.length <= 0) {
+ // this.$message.error('璇烽�夋嫨闇�瑕佹坊鍔犲厓绱犵殑鑺傜偣')
+ // } else {
+ // if (this.structSelection.length === 1) {
+ // } else {
+ // this.$message.error('鍙兘涓哄崟涓妭鐐规坊鍔犲厓绱�')
+ // }
+ // }
},
refreshBom(node) {
if (this.selectedStruct.children != null) {
--
Gitblit v1.9.3