Commit 8fc27163 authored by zhoutong's avatar zhoutong

修复空运出货的一些bug

parent 48168b1f
...@@ -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(() => {
}); });
......
...@@ -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,
......
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