Commit 8fc27163 authored by zhoutong's avatar zhoutong

修复空运出货的一些bug

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