Kaynağa Gözat

feat(售后工单管理): 优化工单表单初始化逻辑及修复涉及事业部门选择交互问题

yusheng 6 ay önce
ebeveyn
işleme
0a93b284cd

+ 15 - 13
hybrid/html/a.html

@@ -135,9 +135,7 @@
 							this.form = res.data.data
 							this.form.formId = res.data.data.id
 							this.form.id = ''
-							this.form.valueJson = {
-								manage_workorder: 3333
-							}
+							this.form.valueJson = {}
 							this.title = this.form.name
 							this.jsonData = JSON.parse(res.data.data.formJson.makingJson);
 							this.jsonData.list.forEach(item => {
@@ -176,17 +174,15 @@
 								item.url = item.url && item.url.replace('/api', this.APIUrl)
 							})
 							this.isFlag = true
-						
-								this.$nextTick(() => {
-									this.$refs.generateForm.setRules('manage_workorder', [{
-										required: false,
-										message: '必须填写'
-									}])
-										if (params.manage_workorder) {
+
+							this.$nextTick(() => {
+
+								if (params.manage_workorder) {
 									this.setSalesServiceWork(params.manage_workorder)
-							}
 
-								})
+								}
+
+							})
 
 
 						}
@@ -247,7 +243,13 @@
 						this.$refs.generateForm.setData({
 							manage_workorder: data
 						});
-
+						this.$refs.generateForm.setRules('manage_workorder', [{
+							required: false,
+							message: '必须填写'
+						}])
+						setTimeout(() => {
+							this.$refs.generateForm.validate(['manage_workorder'])
+						})
 
 					},
 

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.28",
+    "versionName" : "V1.0.3.29",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {

+ 4 - 3
pages/salesServiceManagement/demandList/add.vue

@@ -114,9 +114,9 @@
 
 				</u--input>
 			</u-cell>
-			<u-cell title="涉及事业部门" arrow-direction="down" class="required-mark-new">
-				<u--input slot="value" :disabled="!isDisable"  readonly placeholder="请选择" border="surround"
-					v-model="form.involveDeptName" @click.native="salesDeptShow"></u--input>
+			<u-cell title="涉及事业部门" arrow-direction="down" class="required-mark-new" @click.native="salesDeptShow">
+				<u--input slot="value" :disabled="!isDisable"  style="pointer-events: none;"   placeholder="请选择" border="surround"
+					v-model="form.involveDeptName" ></u--input>
 			</u-cell>
 			<u-cell title="备注说明" arrow-direction="down">
 				<u--textarea border="surround" :disabled="!isDisable" placeholder=" " slot="value" v-model="form.remark"
@@ -305,6 +305,7 @@
 					el.categoryCode = el.code;
 					el.categoryName = el.name;
 					el.categoryModel = el.modelType;
+					el.productCategoryName=el.categoryLevelPath
 					return el;
 				});
 				let params = {

+ 2 - 1
pages/salesServiceManagement/workOrder/components/selectProduct.vue

@@ -357,7 +357,7 @@
 					})
 					return;
 				}
-				//获取仓库库存
+				// //获取仓库库存
 				// if (this.obtain == '仓库') {
 				// 	let codeList = list.map((item) => item.code);
 				// 	let inventoryTotalList = await getInventoryTotalAPI(codeList);
@@ -370,6 +370,7 @@
 
 				// 单选
 				if (this.selectType == '1') {
+					list[0].warehouseNum=list[0].measureQuantity
 					uni.$emit('updateScheme', list[0]);
 				}
 				this.back();