|
|
@@ -60,28 +60,78 @@
|
|
|
:before-close="corpTypeClose"
|
|
|
v-dialog-drag
|
|
|
>
|
|
|
- <Dispatch-Notice v-if="businesstypeData.reportsType == 'PCTZD'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Dispatch-Notice>
|
|
|
+ <Dispatch-Notice
|
|
|
+ v-if="businesstypeData.reportsType == 'PCTZD'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Dispatch-Notice>
|
|
|
|
|
|
- <Receipt-Notice v-else-if="businesstypeData.reportsType == 'RHTZ'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Receipt-Notice>
|
|
|
- <Receipt-Notice_CMA v-else-if="businesstypeData.reportsType == 'RHTZ-CMA'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Receipt-Notice_CMA>
|
|
|
- <Receipt-Notice_HMM v-else-if="businesstypeData.reportsType == 'RHTZ-HMM'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Receipt-Notice_HMM>
|
|
|
- <Receipt-Notice_MELL v-else-if="businesstypeData.reportsType == 'RHTZ-MELL'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Receipt-Notice_MELL>
|
|
|
- <Receipt-Notice_OOCL v-else-if="businesstypeData.reportsType == 'RHTZ-OOCL'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Receipt-Notice_OOCL>
|
|
|
- <Receipt-Notice_ONE v-else-if="businesstypeData.reportsType == 'RHTZ-ONE'" :businesstypeData="businesstypeData" :documentForm="documentForm"></Receipt-Notice_ONE>
|
|
|
+ <Receipt-Notice
|
|
|
+ v-else-if="businesstypeData.reportsType == 'RHTZ'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Receipt-Notice>
|
|
|
+ <Receipt-Notice_CMA
|
|
|
+ v-else-if="businesstypeData.reportsType == 'RHTZ-CMA'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Receipt-Notice_CMA>
|
|
|
+ <Receipt-Notice_HMM
|
|
|
+ v-else-if="businesstypeData.reportsType == 'RHTZ-HMM'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Receipt-Notice_HMM>
|
|
|
+ <Receipt-Notice_MELL
|
|
|
+ v-else-if="businesstypeData.reportsType == 'RHTZ-MELL'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Receipt-Notice_MELL>
|
|
|
+ <Receipt-Notice_OOCL
|
|
|
+ v-else-if="businesstypeData.reportsType == 'RHTZ-OOCL'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Receipt-Notice_OOCL>
|
|
|
+ <Receipt-Notice_ONE
|
|
|
+ v-else-if="businesstypeData.reportsType == 'RHTZ-ONE'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></Receipt-Notice_ONE>
|
|
|
|
|
|
<BillofLadingDetails
|
|
|
v-else-if="businesstypeData.reportsType == 'TDXQ' || businesstypeData.reportsType == 'DCWTS'"
|
|
|
- :businesstypeData="businesstypeData" :documentForm="documentForm"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
></BillofLadingDetails>
|
|
|
- <BillofLadingDetailsM v-else-if="businesstypeData.reportsType == 'MBL BOOKING SHEET'" :businesstypeData="businesstypeData" :documentForm="documentForm"></BillofLadingDetailsM>
|
|
|
- <BillofLadingDetailsJMS v-else-if="businesstypeData.reportsType == 'JMS-BILL'" :businesstypeData="businesstypeData" :documentForm="documentForm"></BillofLadingDetailsJMS>
|
|
|
- <BillofLadingDetailsSI v-else-if="businesstypeData.reportsType == 'SE-SHIPPING'" :businesstypeData="businesstypeData" :documentForm="documentForm"></BillofLadingDetailsSI>
|
|
|
- <BillofLadingDetailsCTO v-else-if="businesstypeData.reportsType == 'CTO'" :businesstypeData="businesstypeData" :documentForm="documentForm"></BillofLadingDetailsCTO>
|
|
|
- <FreightNote v-else-if="businesstypeData.reportsType == 'FREIGHT NOTE'" :businesstypeData="businesstypeData" :documentForm="documentForm"></FreightNote>
|
|
|
+ <BillofLadingDetailsM
|
|
|
+ v-else-if="businesstypeData.reportsType == 'MBL BOOKING SHEET'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></BillofLadingDetailsM>
|
|
|
+ <BillofLadingDetailsJMS
|
|
|
+ v-else-if="businesstypeData.reportsType == 'JMS-BILL'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></BillofLadingDetailsJMS>
|
|
|
+ <BillofLadingDetailsSI
|
|
|
+ v-else-if="businesstypeData.reportsType == 'SE-SHIPPING'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></BillofLadingDetailsSI>
|
|
|
+ <BillofLadingDetailsCTO
|
|
|
+ v-else-if="businesstypeData.reportsType == 'CTO'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></BillofLadingDetailsCTO>
|
|
|
+ <FreightNote
|
|
|
+ v-else-if="businesstypeData.reportsType == 'FREIGHT NOTE'"
|
|
|
+ :businesstypeData="businesstypeData"
|
|
|
+ :documentForm="documentForm"
|
|
|
+ ></FreightNote>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<!--<el-button type="success" @click="documentSubmit(true)" >保存并打印</el-button>-->
|
|
|
<el-button type="primary" @click="documentSubmit(false)">保 存</el-button>
|
|
|
- <el-button v-if="addShow" type="success" :disabled="!documentForm.id" @click="dialogPreviewfun(editData)">打印</el-button>
|
|
|
+ <!-- <el-button v-if="addShow" type="success" :disabled="!documentForm.id" @click="dialogPreviewfun(editData)">打印</el-button>-->
|
|
|
+ <el-button type="success" :disabled="!documentForm.id" @click="documentSubmit(true)">打 印</el-button>
|
|
|
<el-button @click="printingCanceling">取 消</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
@@ -477,7 +527,7 @@ export default {
|
|
|
label: "报表编码",
|
|
|
prop: "reportsCode",
|
|
|
overHidden: true,
|
|
|
- hide: true,
|
|
|
+ hide: true
|
|
|
},
|
|
|
{
|
|
|
label: "单据类型",
|
|
|
@@ -536,7 +586,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 打印预览按钮
|
|
|
- async dialogPreviewfun(row) {
|
|
|
+ async dialogPreviewfun(row, type) {
|
|
|
this.editData = row;
|
|
|
if (row.printContent) {
|
|
|
this.documentForm = JSON.parse(row.printContent).data;
|
|
|
@@ -549,9 +599,19 @@ export default {
|
|
|
logId: row.id
|
|
|
});
|
|
|
this.$nextTick(() => {
|
|
|
- if (data.length == 1) {
|
|
|
+ if (data.length === 1) {
|
|
|
this.handleReportPreview(data[0], data[0].url, this.documentForm);
|
|
|
+ if (type) {
|
|
|
+ this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: row.reportsCode });
|
|
|
+ this.editData = {};
|
|
|
+ this.documentForm = {};
|
|
|
+ this.documenturl = {};
|
|
|
+ this.documentVisible = false;
|
|
|
+ }
|
|
|
} else {
|
|
|
+ if (type) {
|
|
|
+ this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: row.reportsCode });
|
|
|
+ }
|
|
|
this.previewDialog = true;
|
|
|
this.documentVisible = false;
|
|
|
}
|
|
|
@@ -658,6 +718,12 @@ export default {
|
|
|
},
|
|
|
// 新建单证按钮
|
|
|
addbtnfun() {
|
|
|
+ let that = this;
|
|
|
+ this.$emit("editCustomer", undefined, function(){
|
|
|
+ that.addbtnfun2()
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addbtnfun2 () {
|
|
|
if (!this.assemblyForm.id) {
|
|
|
this.$message.warning("请先保存数据");
|
|
|
return;
|
|
|
@@ -677,7 +743,7 @@ export default {
|
|
|
allowCreateCount: this.businesstypeData.allowCreateCount,
|
|
|
params: this.businesstypeData.params
|
|
|
}).then(res => {
|
|
|
- this.editData={}
|
|
|
+ this.editData = {};
|
|
|
this.editData.groupCode = this.businesstypeData.groupCode;
|
|
|
this.documentForm = res.data.data.data;
|
|
|
// 联系人
|
|
|
@@ -743,10 +809,17 @@ export default {
|
|
|
},
|
|
|
// 单证弹窗的确认按钮
|
|
|
documentSubmit(type) {
|
|
|
+ let needSave = false;
|
|
|
+ let s1 = "",
|
|
|
+ s2 = "";
|
|
|
let obj = {};
|
|
|
if (this.editData.id) {
|
|
|
obj = this.editData;
|
|
|
+ s1 = JSON.stringify(JSON.parse(obj.printContent).data);
|
|
|
+ s2 = JSON.stringify(this.documentForm);
|
|
|
+ needSave = s1 !== s2;
|
|
|
} else {
|
|
|
+ needSave = true;
|
|
|
// obj.remarks = this.assemblyForm.remarks
|
|
|
obj.businessType = this.assemblyForm.businessType;
|
|
|
obj.billId = this.assemblyForm.id;
|
|
|
@@ -759,30 +832,34 @@ export default {
|
|
|
obj.allowPrintCount = 0;
|
|
|
obj.printCount = 0;
|
|
|
}
|
|
|
- obj.printContent = JSON.stringify({
|
|
|
- data: {
|
|
|
- ...this.documentForm,
|
|
|
- // to: this.documentForm.corpCnName,
|
|
|
- // attn: this.documentForm.corpAttnName,
|
|
|
- fm: this.documentForm.createUserName,
|
|
|
- fax: this.documentForm.fax,
|
|
|
- cc: this.documentForm.cc,
|
|
|
- email: this.documentForm.email,
|
|
|
- department: this.documentForm.corpAttnName,
|
|
|
- operate: this.documentForm.operatorName,
|
|
|
- mobilePhone: this.documentForm.mobilePhone,
|
|
|
- // remarks: this.documentForm.remarks,
|
|
|
- contacts: this.documentForm.cyContacts,
|
|
|
- deliverylocation: this.documentForm.cyCnName,
|
|
|
- shippingAgency: this.documentForm.bookingAgentCnName,
|
|
|
- Telephone: this.documentForm.cyTel,
|
|
|
- datetime: dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss")
|
|
|
- }
|
|
|
- // url:this.documenturl
|
|
|
- });
|
|
|
- // 保存
|
|
|
- reportslogSubmit(obj).then(res => {
|
|
|
- if (type) {
|
|
|
+
|
|
|
+ if (needSave === true) {
|
|
|
+ obj.printContent = JSON.stringify({
|
|
|
+ data: {
|
|
|
+ ...this.documentForm,
|
|
|
+ // to: this.documentForm.corpCnName,
|
|
|
+ // attn: this.documentForm.corpAttnName,
|
|
|
+ fm: this.documentForm.createUserName,
|
|
|
+ fax: this.documentForm.fax,
|
|
|
+ cc: this.documentForm.cc,
|
|
|
+ email: this.documentForm.email,
|
|
|
+ department: this.documentForm.corpAttnName,
|
|
|
+ operate: this.documentForm.operatorName,
|
|
|
+ mobilePhone: this.documentForm.mobilePhone,
|
|
|
+ // remarks: this.documentForm.remarks,
|
|
|
+ contacts: this.documentForm.cyContacts,
|
|
|
+ deliverylocation: this.documentForm.cyCnName,
|
|
|
+ shippingAgency: this.documentForm.bookingAgentCnName,
|
|
|
+ Telephone: this.documentForm.cyTel,
|
|
|
+ datetime: dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss")
|
|
|
+ }
|
|
|
+ // url:this.documenturl
|
|
|
+ });
|
|
|
+ // 保存
|
|
|
+ reportslogSubmit(obj).then(res => {
|
|
|
+ if (type) {
|
|
|
+ this.dialogPreviewfun(res.data.data, true);
|
|
|
+ /*
|
|
|
let documentaa = null; // 暂存url数据
|
|
|
reportsList(1, 20, {
|
|
|
businessType: "HYCK",
|
|
|
@@ -840,15 +917,21 @@ export default {
|
|
|
// 取消操作。。。。
|
|
|
});
|
|
|
});
|
|
|
- } else {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
|
|
|
- this.editData = {};
|
|
|
- this.documentForm = {};
|
|
|
- this.documenturl = {};
|
|
|
- this.documentVisible = false;
|
|
|
+ */
|
|
|
+ } else {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
|
|
|
+ this.editData = {};
|
|
|
+ this.documentForm = {};
|
|
|
+ this.documenturl = {};
|
|
|
+ this.documentVisible = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (type) {
|
|
|
+ this.dialogPreviewfun(obj);
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
// 打印取消
|
|
|
printingCanceling() {
|