Browse Source

导入发货通知单,成功失败列表

java8
han\hanst 5 months ago
parent
commit
40a2767745
  1. 2
      src/api/ecss/ecss.js
  2. 31
      src/views/modules/ecss/codelnotify.vue
  3. 5
      src/views/modules/ecss/createDeclaration.vue
  4. 71
      src/views/modules/ecss/del_upload_excel.vue

2
src/api/ecss/ecss.js

@ -44,8 +44,6 @@ export const deleteSubPropertiesValueForAlone= data => createAPI(`/ecss/coDel/de
export const deleteHsCode= data => createAPI(`/ecss/coDel/deleteHsCode`,'post',data) export const deleteHsCode= data => createAPI(`/ecss/coDel/deleteHsCode`,'post',data)
export const searchCoDelPalletData= data => createAPI(`/ecss/coDel/searchCoDelPalletData`,'post',data)
export const searchCoDelPalletDataNew= data => createAPI(`/ecss/coDel/searchCoDelPalletDataNew`,'post',data) export const searchCoDelPalletDataNew= data => createAPI(`/ecss/coDel/searchCoDelPalletDataNew`,'post',data)
export const selectBoxList = data => createAPI(`/ecss/coDel/selectBoxList`,'post',data) export const selectBoxList = data => createAPI(`/ecss/coDel/selectBoxList`,'post',data)

31
src/views/modules/ecss/codelnotify.vue

@ -85,6 +85,7 @@
<a type="text" size="small" @click="updateHeaderModelDo(scope.row)">修改</a> <a type="text" size="small" @click="updateHeaderModelDo(scope.row)">修改</a>
<a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已计划' && scope.row.notifyStatus!=='订单取消'" @click="xiadaChoose()">下达</a> <a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已计划' && scope.row.notifyStatus!=='订单取消'" @click="xiadaChoose()">下达</a>
<a type="text" style="color: orange" size="small" v-if="scope.row.notifyStatus==='已下达'&& scope.row.notifyStatus!=='订单取消'" @click="jihuaEcssDel(scope.row)">取消下达</a> <a type="text" style="color: orange" size="small" v-if="scope.row.notifyStatus==='已下达'&& scope.row.notifyStatus!=='订单取消'" @click="jihuaEcssDel(scope.row)">取消下达</a>
<a type="text" style="color: green" size="small" v-if="scope.row.notifyStatus==='已下达' && scope.row.walMartOrderFlag==='Y'" @click="declarationCompleted(scope.row)">一键结单</a>
<a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus!=='订单取消'" @click="cancelDelHeader(scope.row)">废弃</a> <a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus!=='订单取消'" @click="cancelDelHeader(scope.row)">废弃</a>
<a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus==='已计划'&& scope.row.notifyStatus!=='订单取消'" @click="deleteDelHeader(scope.row)">删除</a> <a type="text" style="color: red" size="small" v-if="scope.row.notifyStatus==='已计划'&& scope.row.notifyStatus!=='订单取消'" @click="deleteDelHeader(scope.row)">删除</a>
</template> </template>
@ -158,9 +159,9 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="装箱明细" name="pallet"> <el-tab-pane label="装箱明细" name="pallet">
<packing-detail-tab
<packing-detail-tab
ref="packingDetailTab" ref="packingDetailTab"
:current-row="currentRow"
:current-row="currentRow"
:height="height"> :height="height">
</packing-detail-tab> </packing-detail-tab>
</el-tab-pane> </el-tab-pane>
@ -653,7 +654,6 @@
changeEcssDelStatus, changeEcssDelStatus,
updateEcssDelDetail, updateEcssDelDetail,
deleteEcssDelDetail, deleteEcssDelDetail,
searchCoDelPalletData,
searchCoDelPalletDataNew, searchCoDelPalletDataNew,
queryPartListAll, queryPartListAll,
searchTemplateList, searchTemplateList,
@ -1871,6 +1871,31 @@
}) })
}) })
}, },
declarationCompleted(row){
let inData={
site:row.site,
delNo:row.delNo,
walMartOrderFlag:row.walMartOrderFlag,
notifyStatus:'已报关'
}
this.$confirm('确认一键结单吗?', '提示').then(() => {
changeEcssDelStatus(inData).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
// //
sizeChangeHandle3 (val) { sizeChangeHandle3 (val) {
this.pageSize3 = val this.pageSize3 = val

5
src/views/modules/ecss/createDeclaration.vue

@ -132,9 +132,9 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="装箱明细" name="pallet"> <el-tab-pane label="装箱明细" name="pallet">
<packing-detail-tab
<packing-detail-tab
ref="packingDetailTab" ref="packingDetailTab"
:current-row="currentRow"
:current-row="currentRow"
:height="height"> :height="height">
</packing-detail-tab> </packing-detail-tab>
</el-tab-pane> </el-tab-pane>
@ -482,7 +482,6 @@
import { import {
searchEcssCoDelNotifyHeaderForDanZheng, searchEcssCoDelNotifyHeaderForDanZheng,
searchEcssCoDelNotifyDetail, searchEcssCoDelNotifyDetail,
searchCoDelPalletData,
searchCoDelPalletDataNew, searchCoDelPalletDataNew,
getDeclarationDefaultData, getDeclarationDefaultData,
saveDeclaration, saveDeclaration,

71
src/views/modules/ecss/del_upload_excel.vue

@ -262,7 +262,7 @@
if (this.cacheTimer) { if (this.cacheTimer) {
clearTimeout(this.cacheTimer); clearTimeout(this.cacheTimer);
} }
// 500ms // 500ms
this.cacheTimer = setTimeout(() => { this.cacheTimer = setTimeout(() => {
try { try {
@ -315,7 +315,7 @@
init () { init () {
this.fileList = [] this.fileList = []
this.cacheKey = this.generateCacheKey(); this.cacheKey = this.generateCacheKey();
let tempData = { let tempData = {
username: this.$store.state.user.name, username: this.$store.state.user.name,
} }
@ -329,14 +329,14 @@
// BU // BU
this.loadFromCache(); this.loadFromCache();
}) })
getCustomerList({}).then(({data}) => { getCustomerList({}).then(({data}) => {
// //
if (data && data.code === 0) { if (data && data.code === 0) {
this.customerList=data.rows this.customerList=data.rows
} }
}); });
// //
if (!this.loadFromCache()) { if (!this.loadFromCache()) {
this.pageData.customerName='' this.pageData.customerName=''
@ -346,7 +346,7 @@
this.pageData.overseasAddress='', this.pageData.overseasAddress='',
this.pageData.salesArea='' this.pageData.salesArea=''
} }
this.customerPersons=[] this.customerPersons=[]
this.customerAddrs=[] this.customerAddrs=[]
// //
@ -481,20 +481,63 @@
formData.append("overseasAddress", this.pageData.overseasAddress) formData.append("overseasAddress", this.pageData.overseasAddress)
formData.append("cnative", this.pageData.cnative) formData.append("cnative", this.pageData.cnative)
formData.append("salesArea", this.pageData.salesArea) formData.append("salesArea", this.pageData.salesArea)
saveEcssCoDelNotifyByExcel(formData).then(({data}) => {
saveEcssCoDelNotifyByExcel(formData).then(({ data }) => {
if (data.code === 0) { if (data.code === 0) {
this.$message.success(data.msg)
//
this.clearCache()
//
this.closeDialog()
const { resultMap } = data;
const successList = resultMap.success || [];
const failList = resultMap.fail || [];
//
let html = `
<div style="max-height:380px;overflow:auto;font-size:12px;line-height:1.4;">
`;
if (successList.length > 0) {
html += `<div style="margin-bottom:6px;">
<div style="color:green;font-weight:bold;margin-bottom:3px;">
成功${successList.length}
</div>
<table border="1" cellspacing="0" cellpadding="2"
style="border-collapse:collapse;width:100%;">
`;
successList.forEach(item => {
html += `<tr><td style="color:green;padding:2px 4px;">${item}</td></tr>`;
});
html += `</table></div>`;
}
if (failList.length > 0) {
html += `<div>
<div style="color:red;font-weight:bold;margin-bottom:3px;">
失败${failList.length}
</div>
<table border="1" cellspacing="0" cellpadding="2"
style="border-collapse:collapse;width:100%;">
`;
failList.forEach(item => {
html += `<tr><td style="color:red;padding:2px 4px;">${item}</td></tr>`;
});
html += `</table></div>`;
}
html += `</div>`;
this.$alert(html, '导入结果', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
callback: () => {
this.clearCache();
this.closeDialog();
}
});
} else { } else {
//this.$message.error(data.msg)
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
})
});
} }
})
});
}, },
// //

Loading…
Cancel
Save