|
@@ -283,6 +283,27 @@
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template v-slot:totalWeight="scope">
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ style="margin-bottom: 20px"
|
|
|
|
|
+ :rules="{
|
|
|
|
|
+ required: false,
|
|
|
|
|
+ pattern: numberReg,
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ }"
|
|
|
|
|
+ :prop="'datasource.' + scope.$index + '.totalWeight'"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="scope.row.totalWeight"
|
|
|
|
|
+ @input="changeCount(scope.row, scope.$index, 'totalWeight')"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot="append">
|
|
|
|
|
+ {{ scope.row.weightUnit }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </template>
|
|
|
<template v-slot:technicalAnswerName="{ row, $index }">
|
|
<template v-slot:technicalAnswerName="{ row, $index }">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
style="margin-bottom: 20px"
|
|
@@ -561,7 +582,7 @@
|
|
|
import { numberReg, positiveIntegerReg } from 'ele-admin';
|
|
import { numberReg, positiveIntegerReg } from 'ele-admin';
|
|
|
import productList from '@/BIZComponents/product-list.vue';
|
|
import productList from '@/BIZComponents/product-list.vue';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
-
|
|
|
|
|
|
|
+ import headList from '@/BIZComponents/user-select/user-select.vue';
|
|
|
import billDetailDialog from './billDetailDialog.vue';
|
|
import billDetailDialog from './billDetailDialog.vue';
|
|
|
import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
|
|
import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
|
|
|
import { pricingWayList, lbjtList } from '@/enum/dict.js';
|
|
import { pricingWayList, lbjtList } from '@/enum/dict.js';
|
|
@@ -596,7 +617,8 @@
|
|
|
taskinstanceDialog,
|
|
taskinstanceDialog,
|
|
|
// fileMain,
|
|
// fileMain,
|
|
|
productList,
|
|
productList,
|
|
|
- billDetailDialog
|
|
|
|
|
|
|
+ billDetailDialog,
|
|
|
|
|
+ headList
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
canHandl() {
|
|
canHandl() {
|
|
@@ -892,11 +914,11 @@
|
|
|
label: '总重',
|
|
label: '总重',
|
|
|
slot: 'totalWeight',
|
|
slot: 'totalWeight',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- formatter: (row, column) => {
|
|
|
|
|
- if (row.totalWeight) {
|
|
|
|
|
- return row.totalWeight + ' ' + (row.weightUnit || '');
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // formatter: (row, column) => {
|
|
|
|
|
+ // if (row.totalWeight) {
|
|
|
|
|
+ // return row.totalWeight + ' ' + (row.weightUnit || '');
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
width: 180,
|
|
width: 180,
|
|
@@ -1101,8 +1123,19 @@
|
|
|
this.changeAll();
|
|
this.changeAll();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 改变总重
|
|
|
|
|
+ changeTotalWeight(row, index) {
|
|
|
|
|
+ // this.$set(
|
|
|
|
|
+ // this.form.datasource[index],
|
|
|
|
|
+ // 'singleWeight',
|
|
|
|
|
+ // row.totalWeight ? (row.totalWeight / row.purchaseCount).toFixed(2) : 0
|
|
|
|
|
+ // );
|
|
|
|
|
+ // row.singleWeight = row.totalWeight ? (row.totalWeight / row.purchaseCount).toFixed(2) : 0
|
|
|
|
|
+ console.log('changeTotalWeight~~', row, this.form.datasource[index]);
|
|
|
|
|
+ this.changeCount(row, index)
|
|
|
|
|
+ },
|
|
|
//改变数量
|
|
//改变数量
|
|
|
- changeCount(row, index) {
|
|
|
|
|
|
|
+ changeCount(row, index, weightType) {
|
|
|
// if (this.detailType) {
|
|
// if (this.detailType) {
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
@@ -1126,7 +1159,7 @@
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form,
|
|
this.form,
|
|
|
'datasource[' + index + ']',
|
|
'datasource[' + index + ']',
|
|
|
- changeCount(row, countObj)
|
|
|
|
|
|
|
+ changeCount(row, countObj, false, weightType)
|
|
|
);
|
|
);
|
|
|
this.setIncreaseTotalWeight(row, index);
|
|
this.setIncreaseTotalWeight(row, index);
|
|
|
}
|
|
}
|