|
|
@@ -71,8 +71,12 @@
|
|
71
|
71
|
</el-table-column>
|
|
72
|
72
|
<el-table-column prop="totalPrice" label="价值(万元)" align="center" width="114">
|
|
73
|
73
|
<template #default="scope">
|
|
74
|
|
- {{ (scope.row.quantity)*(scope.row.unitPrice)/10000 ? (scope.row.quantity)*(scope.row.unitPrice)/10000 : 0 }}
|
|
75
|
|
- <!-- <el-input v-model="scope.row.totalPrice" size="small"></el-input> -->
|
|
|
74
|
+ <span v-if="scope.row.materialTree && wanJson.indexOf(scope.row.materialTree[3]) == -1">
|
|
|
75
|
+ {{ (scope.row.quantity)*(scope.row.unitPrice)/10000 ? (scope.row.quantity)*(scope.row.unitPrice)/10000 : 0 }}
|
|
|
76
|
+ </span>
|
|
|
77
|
+ <span v-else>
|
|
|
78
|
+ {{ (scope.row.quantity)*(scope.row.unitPrice) ? (scope.row.quantity)*(scope.row.unitPrice) : 0 }}
|
|
|
79
|
+ </span>
|
|
76
|
80
|
</template>
|
|
77
|
81
|
</el-table-column>
|
|
78
|
82
|
<el-table-column prop="isAvailable" label="是否可用" align="center" width="120">
|
|
|
@@ -135,6 +139,8 @@ import { useDict } from '@/hooks/dict';
|
|
135
|
139
|
const { outdound_type, is_available, province_ch } = useDict('outdound_type', 'is_available', 'province_ch');
|
|
136
|
140
|
|
|
137
|
141
|
const props = defineProps(['id','type'])
|
|
|
142
|
+// 价值计算带万
|
|
|
143
|
+const wanJson = ['118', '122', '124', '132', '182', '184']
|
|
138
|
144
|
|
|
139
|
145
|
const tableData = ref([{}]);
|
|
140
|
146
|
const wzOptions = ref([])
|
|
|
@@ -214,14 +220,21 @@ const saveSubmit = (status) => {
|
|
214
|
220
|
deptId: formData.value.deptId,
|
|
215
|
221
|
warehouse: showCh(formData.value.deptId, dcckOptions.value)
|
|
216
|
222
|
}
|
|
217
|
|
- postData.outboundMaterialInfos = tableData.value.map(({filePartList, ...item}) => ({
|
|
218
|
|
- ...item,
|
|
219
|
|
- materialGroup: item.materialTree[0],
|
|
220
|
|
- materialType: item.materialTree[1],
|
|
221
|
|
- materialName: item.materialTree[2],
|
|
222
|
|
- unit: item.materialTree[3],
|
|
223
|
|
- totalPrice: (item.quantity)*(item.unitPrice)/10000 ? (item.quantity)*(item.unitPrice)/10000 : 0
|
|
224
|
|
- }));
|
|
|
223
|
+ postData.outboundMaterialInfos = tableData.value.map(function({filePartList, ...item}){
|
|
|
224
|
+ let totalPrice = (item.quantity)*(item.unitPrice) ? (item.quantity)*(item.unitPrice) : 0
|
|
|
225
|
+ if(wanJson.indexOf(item.materialTree[3]) == -1){
|
|
|
226
|
+ totalPrice = (item.quantity)*(item.unitPrice)/10000 ? (item.quantity)*(item.unitPrice)/10000 : 0
|
|
|
227
|
+ }
|
|
|
228
|
+ let returnData = {
|
|
|
229
|
+ ...item,
|
|
|
230
|
+ materialGroup: item.materialTree[0],
|
|
|
231
|
+ materialType: item.materialTree[1],
|
|
|
232
|
+ materialName: item.materialTree[2],
|
|
|
233
|
+ unit: item.materialTree[3],
|
|
|
234
|
+ totalPrice: totalPrice
|
|
|
235
|
+ }
|
|
|
236
|
+ return returnData;
|
|
|
237
|
+ });
|
|
225
|
238
|
if(props.id){
|
|
226
|
239
|
updateOutData(postData).then((res: any) => {
|
|
227
|
240
|
if (res.code === 0) {
|