Commit 932685f2 authored by 我在何方's avatar 我在何方
parents 8162e0a8 8fc27163
......@@ -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.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2"); */
......@@ -379,7 +380,7 @@ export default {
objectiveId: this.form.destWarehouseId
}
// 空运才需要渠道
if(data.transportId == 4){
if(data.transportId == 4 || data.transportId == 3){
data.channelId = this.form.shippingChannelId
}
// 获得已封柜方数
......
......@@ -65,6 +65,15 @@
<el-radio :label="2">{{$t('重量误报')}}</el-radio>
</el-radio-group>
</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 :label="$t('删单退场状态')">
{{getCheckExamineStatus}}
......@@ -372,10 +381,19 @@ export default {
},
//提交删单退场审核
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({
shipmentId: this.shipmentObj.id,
approvalStatus: 0,
approvalType: 11
approvalType: 11,
details: JSON.stringify(details)
}).then((res) => {
serviceMsg(res, this).then(() => {
});
......
......@@ -109,11 +109,11 @@
<!--<div class="red-label">
<p>{{$t('可分拣方数')}}</p>
<p>{{preList.remainVolume}}</p>
</div>-->
</div>
<div class="red-label">
<p>{{$t('重量')}}</p>
<p>{{preList.remainWeight || 0}}kg</p>
</div>
</div-->
<div class="table-button">
<el-button type="success" size="small" @click="addPart" :disabled="isAudit">{{$t('增加')}}</el-button>
</div>
......
......@@ -58,15 +58,17 @@
</el-form>
<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="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-row>
</div>
</template>
<script>
import { airShipmentCreate } from "@/api/ecw/boxSea";
import { airShipmentCreate, approvalCancel } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import { constantDict, formatDateStr, formatNumberString, serviceMsg } from "../utils";
......@@ -87,6 +89,7 @@ export default {
rules: {
deliverType: [{ required: true, message: this.$t("必填"), trigger: "change" }],
},
airShipmentApprovalInfo: {}
};
},
created() {
......@@ -95,7 +98,7 @@ export default {
oldData = formatDateStr(oldData, ["deliverTime"]);
oldData = formatNumberString(oldData, ["deliverType"]);
this.airShipmentObj = oldData;
console.log(this.airShipmentObj)
this.airShipmentApprovalInfo = this.$attrs.shipmentObj.airShipmentApprovalInfo
},
methods: {
/** 提交 */
......@@ -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) {
this.$emit("closeDialog", type);
......
......@@ -67,14 +67,6 @@ export default {
onSubmit(operateType) {
this.$refs["unloadingForm"].validate((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({
...this.unloadingObj,
shipmentId: this.$attrs.shipmentObj.id,
......
......@@ -107,14 +107,14 @@ function airBaseData() {
type: "shipment",
dataKey: "4", // 字典数据键值
/**
* 出货状态:171、待出货 172、已出货
* 出货状态:171、待出货 172、出货审核中 173、审核失败 174、审核成功 = 175、已出货
*/
voName: "boxAirShipmentBackVO",
keyName: "airShipmentStatus",
status: {
start: [171],
wait: [],
end: [172],
wait: [172,173],
end: [175],
},
},
{
......
......@@ -6,12 +6,13 @@
<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('品牌')" >
<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 :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.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('商品特性')">{{productAttr}}</el-descriptions-item>
</el-descriptions>
......@@ -172,10 +173,13 @@ export default {
return JSON.parse(this.packAfterData.orderWarehouseInContent)
},
productAttr(){
if(this.productAttrList.length==0||!this.orderItem.prodAttrIds) return ''
var data = []
if(this.productAttrList.length==0||!this.orderItem.warehouseInProdAttrIds) return ''
let data = []
// 要拆分成数组再用indexOf,字符串直接indexOf会有问题,"12,3".indexOf('1') > -1 为true
let warehouseInProdAttrIds = this.orderItem.warehouseInProdAttrIds.split(',')
console.log({warehouseInProdAttrIds})
this.productAttrList.forEach(item=>{
if(this.orderItem.prodAttrIds.indexOf(item.id)>-1){
if(warehouseInProdAttrIds.indexOf(`${item.id}`)>-1){
data.push(this.$l(item, 'attrName'))
}
})
......
......@@ -336,7 +336,7 @@ export default {
// 显示打包弹层
package(row, title = null){
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('打包')
},
// 无需打包
......
......@@ -837,7 +837,7 @@ export default {
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
......
......@@ -443,7 +443,7 @@ export default {
currencyAndUnit(){
let currency = null, unit = null, fields = null
// 如果是阶梯价格则取第一阶梯,否则就取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){
currency = obj.allPriceUnit
......@@ -508,7 +508,7 @@ export default {
this.syncAllUnit()
},
'form.minWeightUnit'(minWeightUnit){
console.log('最小计量单位', minWeightUnit)
console.log('最小计量单位', minWeightUnit)
},
'form.transportVolumeUnit'(transportVolumeUnit){
// 最小其计量
......@@ -629,6 +629,7 @@ export default {
advanceStatus: 0,
needBook: 0,
specialList: [],
priceStepList: this.type === 'air' ? [{},{}] : [],
// dayLimit: 10000,
validateEndDate: undefined,
validateStartDate: undefined,
......@@ -639,10 +640,17 @@ export default {
// 是否单询,默认否
needOrderInquiry: 0
}
// 默认体积单位(立方米)
this.setDefaultVolumeUnit(7)
// 默认货币单位(美元)
this.setDefaultPriceUnit(1)
this.$nextTick(() => {
// 默认体积单位,空运为千克,海运为立方米
this.setDefaultVolumeUnit(this.type === 'air' ? 6 : 7)
// 默认货币单位(美元)
this.setDefaultPriceUnit(1)
// 空运默认的阶梯重量单位是千克
if(this.type === 'air'){
this.$set(this.form.priceStepList[0], 'weightUnit', 6)
}
})
this.form.validateStartDate = parseTime(Date.now())
this.form.validateEndDate = parseTime(Date.now() + 86400*365*2*1000)
......@@ -678,21 +686,6 @@ export default {
getCurrencyList().then(res => this.currencyList = 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 => {
if(!this.form.specialList.find(special => special.specialDictType == item.value)){
this.form.specialList.push({
......@@ -705,7 +698,6 @@ export default {
"transportVolumeUnit": null,
})
}
})
},
......@@ -733,7 +725,7 @@ export default {
if(this.form.stepPrice == 1){
fields['weightUnit'] = obj.weightUnit
}
console.log('-> 同步特需单位', fields)
this.syncSpecialUnit(fields)
},
// 同步特需的货币单位和体积单位
......@@ -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.$set(this.form.priceStepList, index, Object.assign(item, obj))
})
......@@ -766,11 +758,13 @@ export default {
callback()
},
setDefaultVolumeUnit(unit){
console.log('设置默认体积单位', unit)
this.$set(this.form, 'transportVolumeUnit', unit)
this.$set(this.form, 'clearanceVolumeUnit', unit)
this.$set(this.form, 'allVolumeUnit', unit)
},
setDefaultPriceUnit(priceUnit){
console.log('设置默认价格单位', priceUnit)
this.$set(this.form, 'transportPriceUnit', priceUnit)
this.$set(this.form, 'clearancePriceUnit', 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