Commit d3d73660 authored by 我在何方's avatar 我在何方
parents 0db4acd0 98202b95
...@@ -180,6 +180,7 @@ export const DICT_TYPE = { ...@@ -180,6 +180,7 @@ export const DICT_TYPE = {
NEED_KNOW_STATUS:'need_know_status',//需知状态 NEED_KNOW_STATUS:'need_know_status',//需知状态
MANUAL_EXCEPTION_TYPE:'manual_exception_type', MANUAL_EXCEPTION_TYPE:'manual_exception_type',
APPLY_STATUS:'apply_status',//特价申请审核状态 APPLY_STATUS:'apply_status',//特价申请审核状态
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
ECASH_INIT:'ecash_init', //e-cash ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type', FEE_TYPE:'receivable_fee_type',
......
...@@ -82,11 +82,14 @@ ...@@ -82,11 +82,14 @@
<el-form-item :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'"> <el-form-item :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'">
<span v-if="tableData[$index].id && !edit"> <span v-if="tableData[$index].id && !edit">
{{ tableData[$index].cartonsNum }} {{ tableData[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData[$index].unit) }} {{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}
</span> </span>
<el-input v-else v-model="tableData[$index].cartonsNum" placeholder=""> <template v-else>
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData[$index].unit) }}</span> <el-input v-model="tableData[$index].cartonsNum" placeholder="" @blur="handleVolume($index)">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}</span>
</el-input> </el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</template>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -362,7 +365,7 @@ ...@@ -362,7 +365,7 @@
<script> <script>
import dictSelector from "@/components/DictSelector" import dictSelector from "@/components/DictSelector"
import {DICT_TYPE, getDictDataLabel} from "@/utils/dict" import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {getWarehouseLastUpdateApprovalInfo, orderWarehouseIn, orderWarehouseInUpdateApply} from '@/api/ecw/order' import {getWarehouseLastUpdateApprovalInfo, orderWarehouseIn, orderWarehouseInUpdateApply} from '@/api/ecw/order'
import { getFeeTypeByOrderProduct, getProductBrankPage } from '@/api/ecw/productBrank' import { getFeeTypeByOrderProduct, getProductBrankPage } from '@/api/ecw/productBrank'
import WorkFlow from "@/components/WorkFlow" import WorkFlow from "@/components/WorkFlow"
...@@ -419,6 +422,7 @@ export default { ...@@ -419,6 +422,7 @@ export default {
return { return {
DICT_TYPE, DICT_TYPE,
getDictDataLabel, getDictDataLabel,
getDictDatas,
opened: false, opened: false,
brandList: [], brandList: [],
formRules: { formRules: {
...@@ -560,15 +564,17 @@ export default { ...@@ -560,15 +564,17 @@ export default {
}) })
}, },
handleVolume(index, val){ handleVolume(index, val){
const {boxGauge1, boxGauge2, boxGauge3} = (val === 1 ? this.tableData1 : this.tableData)[index] setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.tableData1 : this.tableData)[index]
let result = '' let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3) { if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = ((boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || '' result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000)?.toFixed(2) || ''
} else { } else {
result = '' result = ''
} }
if (result === '0.00') result = '0.01'; if (result === '0.00') result = '0.01';
(val === 1 ? this.tableData1 : this.tableData)[index].volume = result (val === 1 ? this.tableData1 : this.tableData)[index].volume = result
}, 0)
}, },
handleSubmit() { handleSubmit() {
const orderWarehouseInItemDoList = [ const orderWarehouseInItemDoList = [
...@@ -691,7 +697,8 @@ export default { ...@@ -691,7 +697,8 @@ export default {
"quantityAll": "", "quantityAll": "",
"unit": "1", "unit": "1",
"volume": '', "volume": '',
"weight": '' "weight": '',
specificationType: '1'
}) })
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment