|
@@ -145,7 +145,7 @@
|
|
|
<!--是否手册纱 -->
|
|
|
<template slot="manualYarnFlag" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="manualYarnFlag">
|
|
|
- <a-select v-model="record.manualYarnFlag">
|
|
|
+ <a-select v-model="record.manualYarnFlag" @change='changeManualYarnFlag'>
|
|
|
<a-select-option value="">请选择</a-select-option>
|
|
|
<a-select-option :value="1">是</a-select-option>
|
|
|
<a-select-option :value="0">否</a-select-option>
|
|
@@ -156,14 +156,14 @@
|
|
|
<!--手册纱单价 -->
|
|
|
<template slot="manualYarnUnitPrice" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="manualYarnUnitPrice">
|
|
|
- <a-input style="width:100%" type="text" v-model="record.manualYarnUnitPrice" />
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.manualYarnUnitPrice" :disabled='manualYarnDisabled' @change="changeManualYarn('Price',record.manualYarnUnitPrice)"/>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
|
|
|
<!--手册纱占比 -->
|
|
|
<template slot="manualYarnProportion" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="manualYarnProportion">
|
|
|
- <a-input style="width:100%" type="text" v-model="record.manualYarnProportion" />
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.manualYarnProportion" :disabled='manualYarnDisabled' @change="changeManualYarn('Proportion',record.manualYarnProportion)"/>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
|
|
@@ -558,6 +558,7 @@ export default {
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
+ manualYarnDisabled: false, //手工纱单价和手工纱占比可输入
|
|
|
msgFormSon: 'test', // 子组件传来数据的变量
|
|
|
syShippingDetailsItemList: [], // 子表信息
|
|
|
editShipDet: {}, // 编辑发运明细
|
|
@@ -690,6 +691,33 @@ export default {
|
|
|
this.syShippingDetailsItemList.push(newRecord)
|
|
|
},
|
|
|
|
|
|
+ //修改是否为手册纱时触发
|
|
|
+ changeManualYarnFlag(val) {
|
|
|
+ this.syShippingDetailsItemList.map(item =>{
|
|
|
+ item.manualYarnFlag = null
|
|
|
+ item.manualYarnFlag = val
|
|
|
+ //是手工纱时
|
|
|
+ if(val === 0){
|
|
|
+ item.manualYarnUnitPrice = 0
|
|
|
+ item.manualYarnProportion = 0
|
|
|
+ this.manualYarnDisabled = true
|
|
|
+ }else {
|
|
|
+ this.manualYarnDisabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+
|
|
|
+ //输入手册纱单价或者手册纱占比时触发
|
|
|
+ changeManualYarn(data,val){
|
|
|
+ console.log(this.syShippingDetailsItemList)
|
|
|
+ this.syShippingDetailsItemList.map(item => {
|
|
|
+ if(data === 'Price'){item.manualYarnUnitPrice = val}
|
|
|
+ else{item.manualYarnProportion = val}
|
|
|
+ })
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+
|
|
|
// --------------------------------------
|
|
|
// 抽屉 取消
|
|
|
handleCancel() {
|