Commit b63f7a0b authored by dragondean@qq.com's avatar dragondean@qq.com

阶梯价格未设置不报错,出错拆单更换数量是否必填接口

parent 7b846879
...@@ -271,10 +271,11 @@ ...@@ -271,10 +271,11 @@
<script> <script>
import { import {
getSplitList, getSplitList,
quantitycheck, // quantitycheck,
createSplitItem, createSplitItem,
deleteSplitItem, deleteSplitItem,
} from "@/api/ecw/orderHandle"; } from "@/api/ecw/orderHandle";
import {quantityRequired} from "@/api/ecw/warehouse";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
import WorkFlow from "@/components/WorkFlow"; import WorkFlow from "@/components/WorkFlow";
import {getOrder, splitItemUpdate} from "@/api/ecw/order"; import {getOrder, splitItemUpdate} from "@/api/ecw/order";
...@@ -614,10 +615,7 @@ export default { ...@@ -614,10 +615,7 @@ export default {
return data; return data;
},*/ },*/
async getSelectData(item) { async getSelectData(item) {
await quantitycheck({ await quantityRequired(this.orderData.lineId).then((res) => {
seaFreightVolume: item.seaFreightVolume,
clearanceFreightVolume: item.clearanceFreightVolume,
}).then((res) => {
if (res.data) { if (res.data) {
this.isQuantity = true; this.isQuantity = true;
this.shopRules.putQuantity = [ this.shopRules.putQuantity = [
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
</el-form-item> </el-form-item>
</template> </template>
</template> </template>
<!--特需--> <!--特需-->
<template v-if="form.priceType==1"> <template v-if="form.priceType==1">
<el-form-item <el-form-item
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" /> <selector disabled v-model="special.clearanceVolumeUnit" :options="unitList" :label-field="$l(null, 'title')" value-field="id" defaultable2 class="w-100" />
</el-form-item> </el-form-item>
</template> </template>
<el-form-item :label="$t('价格有效期')"> <el-form-item :label="$t('价格有效期')">
<el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.validateStartDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
<div>{{ $t('预付') }}<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.detail.needPay" /></div> <div>{{ $t('预付') }}<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.detail.needPay" /></div>
<div>{{ $t('单价模式') }}<dict-tag :type="DICT_TYPE.ECW_PRICE_TYPE" :value="row.detail.priceType" /></div> <div>{{ $t('单价模式') }}<dict-tag :type="DICT_TYPE.ECW_PRICE_TYPE" :value="row.detail.priceType" /></div>
<div v-if="row.detail.minWeight">{{ $t('最小起计量') }}{{ row.detail.minWeight }}{{unitMap[row.detail.minWeightUnit]}}</div> <div v-if="row.detail.minWeight">{{ $t('最小起计量') }}{{ row.detail.minWeight }}{{unitMap[row.detail.minWeightUnit]}}</div>
<!----阶梯定价--> <!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1"> <template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList"> <template v-for="(item, index) in row.detail.priceStepList">
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
全包价: 全包价:
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}} {{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div> </div>
<template v-for="(item, index) in row.detail.specialList"> <template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1"> <template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" > <div :key="item.specialDictType + '_freight'" >
...@@ -384,7 +384,7 @@ export default { ...@@ -384,7 +384,7 @@ export default {
}) })
return map return map
} }
}, },
watch: { watch: {
showLogsDialog(showLogsDialog){ showLogsDialog(showLogsDialog){
...@@ -587,7 +587,7 @@ export default { ...@@ -587,7 +587,7 @@ export default {
warehouseLineDO: {... res.data[0]} warehouseLineDO: {... res.data[0]}
})] })]
}) })
} }
} }
...@@ -630,9 +630,9 @@ export default { ...@@ -630,9 +630,9 @@ export default {
"transportVolumeUnit": null, "transportVolumeUnit": null,
}) })
} }
}) })
}, },
methods: { methods: {
// 同步全部单位 // 同步全部单位
...@@ -735,7 +735,7 @@ export default { ...@@ -735,7 +735,7 @@ export default {
this.form.priceStepList.forEach(item => { this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit'] let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => { notEmptyFields.forEach(field => {
if(item[field].toString().trim() == ''){ if(!item[field] || item[field].toString().trim() == ''){
stepPriceEmpty = true stepPriceEmpty = true
} }
}) })
...@@ -744,7 +744,7 @@ export default { ...@@ -744,7 +744,7 @@ export default {
} }
}) })
if(stepPriceEmpty){ if(stepPriceEmpty){
return this.$message.error(this.$t('阶梯价格设置不能留空')) return this.$message.error(this.$t('阶梯价格设置不能留空'))
} }
} }
......
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