Commit 932685f2 authored by 我在何方's avatar 我在何方
parents 8162e0a8 8fc27163
...@@ -330,7 +330,8 @@ export default { ...@@ -330,7 +330,8 @@ export default {
}) */ }) */
// 查询渠道 // 查询渠道
getChannelList().then((res) => (this.channelList = res.data)); getChannelList().then((res) => (
this.channelList = res.data));
/* this.transportTypes = this.getDictDatas( /* this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2"); */ ).filter((item) => item.value == "1" || item.value == "2"); */
...@@ -379,7 +380,7 @@ export default { ...@@ -379,7 +380,7 @@ export default {
objectiveId: this.form.destWarehouseId objectiveId: this.form.destWarehouseId
} }
// 空运才需要渠道 // 空运才需要渠道
if(data.transportId == 4){ if(data.transportId == 4 || data.transportId == 3){
data.channelId = this.form.shippingChannelId data.channelId = this.form.shippingChannelId
} }
// 获得已封柜方数 // 获得已封柜方数
......
...@@ -65,6 +65,15 @@ ...@@ -65,6 +65,15 @@
<el-radio :label="2">{{$t('重量误报')}}</el-radio> <el-radio :label="2">{{$t('重量误报')}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1" :label="$t('删单退场类型')">
<el-radio-group v-model="cusDeclarationObj.deleteExitType" :disabled="inReview">
<el-radio :label="1">{{$t('退场时间')}}</el-radio>
<el-radio :label="2">{{$t('返回仓库')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && cusDeclarationObj.deleteExitType == 1" :label="$t('退场时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.deleteExitTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1"> <el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1">
<el-form-item :label="$t('删单退场状态')"> <el-form-item :label="$t('删单退场状态')">
{{getCheckExamineStatus}} {{getCheckExamineStatus}}
...@@ -372,10 +381,19 @@ export default { ...@@ -372,10 +381,19 @@ export default {
}, },
//提交删单退场审核 //提交删单退场审核
approvalCreate(){ approvalCreate(){
if(!this.cusDeclarationObj.deleteExitType || !this.cusDeclarationObj.deleteExitTime){
this.$message.error(this.$t("请选择类型或者时间"));
return;
}
let details = {
deleteExitType: this.cusDeclarationObj.deleteExitType,
deleteExitTime: this.cusDeclarationObj.deleteExitTime
}
approvalCreate({ approvalCreate({
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
approvalStatus: 0, approvalStatus: 0,
approvalType: 11 approvalType: 11,
details: JSON.stringify(details)
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
}); });
......
...@@ -109,11 +109,11 @@ ...@@ -109,11 +109,11 @@
<!--<div class="red-label"> <!--<div class="red-label">
<p>{{$t('可分拣方数')}}</p> <p>{{$t('可分拣方数')}}</p>
<p>{{preList.remainVolume}}</p> <p>{{preList.remainVolume}}</p>
</div>--> </div>
<div class="red-label"> <div class="red-label">
<p>{{$t('重量')}}</p> <p>{{$t('重量')}}</p>
<p>{{preList.remainWeight || 0}}kg</p> <p>{{preList.remainWeight || 0}}kg</p>
</div> </div-->
<div class="table-button"> <div class="table-button">
<el-button type="success" size="small" @click="addPart" :disabled="isAudit">{{$t('增加')}}</el-button> <el-button type="success" size="small" @click="addPart" :disabled="isAudit">{{$t('增加')}}</el-button>
</div> </div>
......
...@@ -58,15 +58,17 @@ ...@@ -58,15 +58,17 @@
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
<el-button v-if="airShipmentApprovalInfo && airShipmentApprovalInfo.approvalStatus == 1" type="primary">{{$t('出货审核中')}}</el-button>
<el-button v-if="airShipmentApprovalInfo && airShipmentApprovalInfo.approvalStatus == 1" type="primary" @click="canclAudit">{{$t('取消出货审核')}}</el-button>
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button> <el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button> <el-button v-if="!airShipmentApprovalInfo || airShipmentApprovalInfo.approvalStatus != 1" type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button> <el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { airShipmentCreate } from "@/api/ecw/boxSea"; import { airShipmentCreate, approvalCancel } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils"; import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
...@@ -87,6 +89,7 @@ export default { ...@@ -87,6 +89,7 @@ export default {
rules: { rules: {
deliverType: [{ required: true, message: this.$t("必填"), trigger: "change" }], deliverType: [{ required: true, message: this.$t("必填"), trigger: "change" }],
}, },
airShipmentApprovalInfo: {}
}; };
}, },
created() { created() {
...@@ -95,7 +98,7 @@ export default { ...@@ -95,7 +98,7 @@ export default {
oldData = formatDateStr(oldData, ["deliverTime"]); oldData = formatDateStr(oldData, ["deliverTime"]);
oldData = formatNumberString(oldData, ["deliverType"]); oldData = formatNumberString(oldData, ["deliverType"]);
this.airShipmentObj = oldData; this.airShipmentObj = oldData;
console.log(this.airShipmentObj) this.airShipmentApprovalInfo = this.$attrs.shipmentObj.airShipmentApprovalInfo
}, },
methods: { methods: {
/** 提交 */ /** 提交 */
...@@ -114,6 +117,21 @@ export default { ...@@ -114,6 +117,21 @@ export default {
} }
}); });
}, },
/* 取消审核 */
canclAudit() {
console.log(this.shipmentObj)
approvalCancel({
applyReason: this.$t("取消审核"),
id: this.airShipmentApprovalInfo.id,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
// 触发外层重新查询出货信息
this.cancel("close");
this.$emit("getBoxInfo");
});
});
},
/** 取消 */ /** 取消 */
cancel(type) { cancel(type) {
this.$emit("closeDialog", type); this.$emit("closeDialog", type);
......
...@@ -67,14 +67,6 @@ export default { ...@@ -67,14 +67,6 @@ export default {
onSubmit(operateType) { onSubmit(operateType) {
this.$refs["unloadingForm"].validate((valid) => { this.$refs["unloadingForm"].validate((valid) => {
if (valid) { if (valid) {
if (operateType === 2) {
const { keyName } = this.$attrs.currNode;
const ulStatus = this.$attrs.shipmentObj[keyName];
if (ulStatus !== 185) {
this.$message.error(this.$t("请先通过卸柜审批"));
return;
}
}
unloadCreate({ unloadCreate({
...this.unloadingObj, ...this.unloadingObj,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
......
...@@ -107,14 +107,14 @@ function airBaseData() { ...@@ -107,14 +107,14 @@ function airBaseData() {
type: "shipment", type: "shipment",
dataKey: "4", // 字典数据键值 dataKey: "4", // 字典数据键值
/** /**
* 出货状态:171、待出货 172、已出货 * 出货状态:171、待出货 172、出货审核中 173、审核失败 174、审核成功 = 175、已出货
*/ */
voName: "boxAirShipmentBackVO", voName: "boxAirShipmentBackVO",
keyName: "airShipmentStatus", keyName: "airShipmentStatus",
status: { status: {
start: [171], start: [171],
wait: [], wait: [172,173],
end: [172], end: [175],
}, },
}, },
{ {
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
<el-descriptions-item :label="$t('品名')">{{orderItem.prodTitleZh}}</el-descriptions-item> <el-descriptions-item :label="$t('品名')">{{orderItem.prodTitleZh}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文品名')">{{orderItem.prodTitleEn}}</el-descriptions-item> <el-descriptions-item :label="$t('英文品名')">{{orderItem.prodTitleEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')" > <el-descriptions-item :label="$t('品牌')" >
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="orderItem.brandType" /> <template v-if="orderItem.brandName">{{orderItem.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="orderItem.brandType" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('箱数')">{{orderItem.num+$t('箱')}}</el-descriptions-item> <el-descriptions-item :label="$t('箱数')">{{orderItem.num+$t('箱')}}</el-descriptions-item>
<el-descriptions-item :label="$t('体积')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.volume : orderItem.volume}}m³</el-descriptions-item> <el-descriptions-item :label="$t('体积')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.volume : orderItem.volume}}m³</el-descriptions-item>
<el-descriptions-item :label="$t('重量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.weight : orderItem.weight}}kg</el-descriptions-item> <el-descriptions-item :label="$t('重量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.weight : orderItem.weight}}kg</el-descriptions-item>
<el-descriptions-item :label="$t('量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.quantityAll : orderItem.quantity}}</el-descriptions-item> <el-descriptions-item :label="$t('量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.quantityAll : orderItem.quantity}}</el-descriptions-item>
<el-descriptions-item :label="$t('备货状态')">{{airShipmentData[info.airShipment]}}</el-descriptions-item> <el-descriptions-item :label="$t('备货状态')">{{airShipmentData[info.airShipment]}}</el-descriptions-item>
<el-descriptions-item :label="$t('商品特性')">{{productAttr}}</el-descriptions-item> <el-descriptions-item :label="$t('商品特性')">{{productAttr}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -172,10 +173,13 @@ export default { ...@@ -172,10 +173,13 @@ export default {
return JSON.parse(this.packAfterData.orderWarehouseInContent) return JSON.parse(this.packAfterData.orderWarehouseInContent)
}, },
productAttr(){ productAttr(){
if(this.productAttrList.length==0||!this.orderItem.prodAttrIds) return '' if(this.productAttrList.length==0||!this.orderItem.warehouseInProdAttrIds) return ''
var data = [] let data = []
// 要拆分成数组再用indexOf,字符串直接indexOf会有问题,"12,3".indexOf('1') > -1 为true
let warehouseInProdAttrIds = this.orderItem.warehouseInProdAttrIds.split(',')
console.log({warehouseInProdAttrIds})
this.productAttrList.forEach(item=>{ this.productAttrList.forEach(item=>{
if(this.orderItem.prodAttrIds.indexOf(item.id)>-1){ if(warehouseInProdAttrIds.indexOf(`${item.id}`)>-1){
data.push(this.$l(item, 'attrName')) data.push(this.$l(item, 'attrName'))
} }
}) })
......
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
// 显示打包弹层 // 显示打包弹层
package(row, title = null){ package(row, title = null){
this.packageOrderItem = row this.packageOrderItem = row
this.packageWarehouseItem = this.orderItemList.find(item => item.orderItemId = row.orderItemId) this.packageWarehouseItem = this.orderItemList.find(item => item.orderItemId === row.orderItemId)
this.packageTitle = title || this.$t('打包') this.packageTitle = title || this.$t('打包')
}, },
// 无需打包 // 无需打包
......
...@@ -837,7 +837,7 @@ export default { ...@@ -837,7 +837,7 @@ export default {
orderId: this.warehousing.orderId, orderId: this.warehousing.orderId,
orderItemId: undefined, orderItemId: undefined,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => { orderWarehouseInItemDoList: this.form1.table.map(e => {
return { return {
...e, ...e,
......
...@@ -443,7 +443,7 @@ export default { ...@@ -443,7 +443,7 @@ export default {
currencyAndUnit(){ currencyAndUnit(){
let currency = null, unit = null, fields = null let currency = null, unit = null, fields = null
// 如果是阶梯价格则取第一阶梯,否则就取form中的字段 // 如果是阶梯价格则取第一阶梯,否则就取form中的字段
let obj = this.form.stepPrice == 1 ? this.form.priceStepList[0] : this.form let obj = this.form.stepPrice == 1 ? (this.form.priceStepList[0] || {}) : this.form
// 全包价 // 全包价
if(this.form.priceType == 1){ if(this.form.priceType == 1){
currency = obj.allPriceUnit currency = obj.allPriceUnit
...@@ -508,7 +508,7 @@ export default { ...@@ -508,7 +508,7 @@ export default {
this.syncAllUnit() this.syncAllUnit()
}, },
'form.minWeightUnit'(minWeightUnit){ 'form.minWeightUnit'(minWeightUnit){
console.log('最小计量单位', minWeightUnit) console.log('最小计量单位', minWeightUnit)
}, },
'form.transportVolumeUnit'(transportVolumeUnit){ 'form.transportVolumeUnit'(transportVolumeUnit){
// 最小其计量 // 最小其计量
...@@ -629,6 +629,7 @@ export default { ...@@ -629,6 +629,7 @@ export default {
advanceStatus: 0, advanceStatus: 0,
needBook: 0, needBook: 0,
specialList: [], specialList: [],
priceStepList: this.type === 'air' ? [{},{}] : [],
// dayLimit: 10000, // dayLimit: 10000,
validateEndDate: undefined, validateEndDate: undefined,
validateStartDate: undefined, validateStartDate: undefined,
...@@ -639,10 +640,17 @@ export default { ...@@ -639,10 +640,17 @@ export default {
// 是否单询,默认否 // 是否单询,默认否
needOrderInquiry: 0 needOrderInquiry: 0
} }
// 默认体积单位(立方米) this.$nextTick(() => {
this.setDefaultVolumeUnit(7) // 默认体积单位,空运为千克,海运为立方米
this.setDefaultVolumeUnit(this.type === 'air' ? 6 : 7)
// 默认货币单位(美元) // 默认货币单位(美元)
this.setDefaultPriceUnit(1) this.setDefaultPriceUnit(1)
// 空运默认的阶梯重量单位是千克
if(this.type === 'air'){
this.$set(this.form.priceStepList[0], 'weightUnit', 6)
}
})
this.form.validateStartDate = parseTime(Date.now()) this.form.validateStartDate = parseTime(Date.now())
this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000) this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000)
...@@ -678,21 +686,6 @@ export default { ...@@ -678,21 +686,6 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
/* if(!this.form.specialList || !this.form.specialList.length){
console.log('specialList默认给[]')
this.$set(this.form, 'specialList', [])
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
this.form.specialList.push({
"clearancePrice": !this.$route.query.action ? 0 : null, // 新建默认给0,否则默认是null
"clearancePriceUnit": null,
"clearanceVolumeUnit": null,
"specialDictType": item.value,
"transportPrice": !this.$route.query.action ? 0 : null, // 新建默认给0,否则默认是null
"transportPriceUnit": null,
"transportVolumeUnit": null,
})
})
} */
this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => { this.getDictDatas(this.DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS).forEach(item => {
if(!this.form.specialList.find(special => special.specialDictType == item.value)){ if(!this.form.specialList.find(special => special.specialDictType == item.value)){
this.form.specialList.push({ this.form.specialList.push({
...@@ -705,7 +698,6 @@ export default { ...@@ -705,7 +698,6 @@ export default {
"transportVolumeUnit": null, "transportVolumeUnit": null,
}) })
} }
}) })
}, },
...@@ -733,7 +725,7 @@ export default { ...@@ -733,7 +725,7 @@ export default {
if(this.form.stepPrice == 1){ if(this.form.stepPrice == 1){
fields['weightUnit'] = obj.weightUnit fields['weightUnit'] = obj.weightUnit
} }
console.log('-> 同步特需单位', fields)
this.syncSpecialUnit(fields) this.syncSpecialUnit(fields)
}, },
// 同步特需的货币单位和体积单位 // 同步特需的货币单位和体积单位
...@@ -746,7 +738,7 @@ export default { ...@@ -746,7 +738,7 @@ export default {
}) })
// 如果是阶梯价则需要同步其他阶梯 // 如果是阶梯价则需要同步其他阶梯
if(this.form.stepPrice == 1){ if(this.form.stepPrice == 1 && this.form.priceStepList){
this.form.priceStepList.forEach((item, index) => { this.form.priceStepList.forEach((item, index) => {
this.$set(this.form.priceStepList, index, Object.assign(item, obj)) this.$set(this.form.priceStepList, index, Object.assign(item, obj))
}) })
...@@ -766,11 +758,13 @@ export default { ...@@ -766,11 +758,13 @@ export default {
callback() callback()
}, },
setDefaultVolumeUnit(unit){ setDefaultVolumeUnit(unit){
console.log('设置默认体积单位', unit)
this.$set(this.form, 'transportVolumeUnit', unit) this.$set(this.form, 'transportVolumeUnit', unit)
this.$set(this.form, 'clearanceVolumeUnit', unit) this.$set(this.form, 'clearanceVolumeUnit', unit)
this.$set(this.form, 'allVolumeUnit', unit) this.$set(this.form, 'allVolumeUnit', unit)
}, },
setDefaultPriceUnit(priceUnit){ setDefaultPriceUnit(priceUnit){
console.log('设置默认价格单位', priceUnit)
this.$set(this.form, 'transportPriceUnit', priceUnit) this.$set(this.form, 'transportPriceUnit', priceUnit)
this.$set(this.form, 'clearancePriceUnit', priceUnit) this.$set(this.form, 'clearancePriceUnit', priceUnit)
this.$set(this.form, 'allPriceUnit', priceUnit) this.$set(this.form, 'allPriceUnit', priceUnit)
......
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