Browse Source

支持发货通知单改单(新增、修改、取消)

java8
han\hanst 8 months ago
parent
commit
cb0fb939b8
  1. 1
      src/api/ecss/ecss.js
  2. 140
      src/views/modules/ecss/codelnotify.vue
  3. 106
      src/views/modules/ecss/codelnotifyConfirm.vue
  4. 17
      src/views/modules/ecss/createDeclaration.vue
  5. 18
      src/views/modules/ecss/ecssWalMartOrder.vue
  6. 2
      src/views/modules/ecss/pallet_upload_excel.vue

1
src/api/ecss/ecss.js

@ -10,6 +10,7 @@ export const updateEcssDelHeader = data => createAPI(`/ecss/coDel/updateEcssDelH
export const deleteEcssDelHeader = data => createAPI(`/ecss/coDel/deleteEcssDelHeader`,'post',data)
export const cancelEcssDelHeader = data => createAPI(`/ecss/coDel/cancelEcssDelHeader`,'post',data)
export const changeEcssDelStatus = data => createAPI(`/ecss/coDel/changeEcssDelStatus`,'post',data)

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

@ -25,6 +25,7 @@
<el-option label="已下达" value="已下达"></el-option>
<el-option label="仓库已确认" value="仓库已确认"></el-option>
<el-option label="已报关" value="已报关"></el-option>
<el-option label="订单取消" value="订单取消"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'ReadyDate'" >
@ -47,6 +48,9 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="改单">
<el-checkbox v-model="searchData.modifyData" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
</el-form-item>
<el-form-item :label="' '" >
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
</el-form-item>
@ -74,21 +78,22 @@
highlight-current-row
:height="height"
:data="dataList"
ref="mainTable"
border
ref="mainTable" :cell-style="cellStyle"
border :row-class-name="tableRowClassName"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
header-align="center"
align="center"
width="150"
width="140"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.notifyStatus==='已计划'" @click="updateHeaderModelDo(scope.row)">修改</a>
<a type="text" size="small" v-if="scope.row.notifyStatus==='已计划'" @click="xiadaChoose()">下达</a>
<a type="text" size="small" v-if="scope.row.notifyStatus==='已下达'" @click="jihuaEcssDel(scope.row)">取消下达</a>
<a type="text" size="small" v-if="scope.row.notifyStatus==='已计划'" @click="deleteDelHeader(scope.row)">删除</a>
<a type="text" size="small" v-if="scope.row.notifyStatus!=='订单取消'" @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: orange" size="small" v-if="scope.row.notifyStatus==='已下达'&& scope.row.notifyStatus!=='订单取消'" @click="jihuaEcssDel(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>
</template>
</el-table-column>
<el-table-column
@ -119,9 +124,10 @@
</el-pagination>
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick" >
<el-tab-pane label="明细" name="detail">
<el-button v-show="currentRow.notifyStatus!=='订单取消'" @click="openCreateDetailModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
<el-table ref="detailTable"
:height="height"
:data="dataList2"
:data="dataList2" :cell-style="cellStyleDetail"
border show-summary :summary-method="getSummaries"
style="width: 100%;">
<el-table-column
@ -143,11 +149,11 @@
fixed="left"
header-align="center"
align="center"
width="100"
width="100" v-if="currentRow.notifyStatus!=='订单取消'"
label="操作">
<template slot-scope="scope">
<a v-if="currentRow.notifyStatus==='已计划'" type="text" size="small" @click="openUpdateDetailModel(scope.row)">修改</a>
<a v-if="currentRow.notifyStatus==='已计划'" type="text" size="small" @click="deleteDelDetail(scope.row)">删除</a>
<a v-if="currentRow.notifyStatus!=='订单取消'&& scope.row.qty!==0" type="text" size="small" @click="openUpdateDetailModel(scope.row)">修改</a>
<a v-if="currentRow.notifyStatus!=='订单取消' && scope.row.qty!==0" style="color: red" type="text" size="small" @click="deleteDelDetail(scope.row)">取消</a>
</template>
</el-table-column>
</el-table>
@ -210,7 +216,7 @@
<el-col :span="6">
<el-form-item :label="'ReadyDate'" >
<el-date-picker
style="width: 145px"
style="width: 145px" :disabled="currentRow.notifyStatus!=='已计划'"
v-model="updateHeaderModel.readyDate"
type="date"
format="yyyy-MM-dd"
@ -462,6 +468,7 @@
searchEcssCoDelNotifyDetail,
updateEcssDelHeader,
deleteEcssDelHeader,
cancelEcssDelHeader,
changeEcssDelStatus,
updateEcssDelDetail,
deleteEcssDelDetail,
@ -567,6 +574,7 @@
updateDetailModelFlag:false,
updateDetailModel:{
site:'',
buNo:'',
delNo:'',
itemNo:'',
partNo:'',
@ -592,6 +600,7 @@
upc:'',
remark:'',
pn:'',
addFlag:''
},
activeName:'detail',
columnList1: [
@ -611,7 +620,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 60
},
{
userId: this.$store.state.user.name,
@ -739,6 +748,24 @@
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table1NotifyStatus',
tableId: "801001Table1",
tableName: "关务系统发货通知单",
columnProp: "modifyLabel",
headerAlign: "center",
align: "left",
columnLabel: "改单",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
@ -1593,6 +1620,9 @@
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
this.dataList.forEach(o => {
o.modifyLabel = !!o.modifyFlag?'是':'';
});
}else {
this.changeData(null)
}
@ -1706,9 +1736,47 @@
this.xiadaEcssDel()
}
},
cancelDelHeader(row){
this.$confirm('确认废弃吗?', '提示').then(() => {
cancelEcssDelHeader(row).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
tableRowClassName({row}) {
if (row.notifyStatus==='订单取消') {
return 'warning-row';
}
},
cellStyle({row, column }) {
if (column.property === 'modifyLabel' && row.modifyLabel==='是') { //
return { color: '#ff5d03' };
}
return {};
},
cellStyleDetail({row, column }) {
if ((column.property === 'pn' || column.property === 'qty') && row.modifyFlag===true) { //
return { color: '#ff5d03' };
}
return {};
},
xiadaEcssDel(){
let inData={
site:this.currentRow.site,
buNo:this.currentRow.buNo,
createBy:this.currentRow.createBy,
delNo:this.currentRow.delNo,
notifyStatus:'已下达',
walMartOrderFlag:this.walMartOrderFlag
@ -1847,12 +1915,45 @@
}
})
},
openCreateDetailModel(){
this.updateDetailModel.site=this.currentRow.site;
this.updateDetailModel.buNo=this.currentRow.buNo;
this.updateDetailModel.delNo=this.currentRow.delNo;
this.updateDetailModel.partNo=''
this.updateDetailModel.qty=''
this.updateDetailModel.partDescription=''
this.updateDetailModel.itemNo=''
this.updateDetailModel.salesOrder=''
this.updateDetailModel.line=''
this.updateDetailModel.customerPO=''
this.updateDetailModel.version=''
this.updateDetailModel.status=''
this.updateDetailModel.family=''
this.updateDetailModel.lt=''
this.updateDetailModel.cmcComment=''
this.updateDetailModel.saleType=''
this.updateDetailModel.awbBl=''
this.updateDetailModel.shippingNumber=''
this.updateDetailModel.forwarderInfo=''
this.updateDetailModel.currency=''
this.updateDetailModel.tp=''
this.updateDetailModel.ttlAmount=''
this.updateDetailModel.sumPrice=''
this.updateDetailModel.so=''
this.updateDetailModel.upc=''
this.updateDetailModel.remark=''
this.updateDetailModel.pn=''
this.updateDetailModel.addFlag=0
this.updateDetailModelFlag=true
},
openUpdateDetailModel(row){
this.updateDetailModel=JSON.parse(JSON.stringify(row));
this.updateDetailModel.addFlag=1
this.updateDetailModelFlag=true
},
deleteDelDetail(row){
this.$confirm('确认删除此明细?', '提示').then(() => {
this.$confirm('确认取消此明细?', '提示').then(() => {
deleteEcssDelDetail(row).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
@ -1925,10 +2026,10 @@
sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
break;
case 'ttlAmount':
sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`;
break;
case 'sumPrice':
sums[index] = `${values.reduce((a, b) => a + b, 0)}`;
sums[index] = `${values.reduce((a, b) => a + b, 0).toFixed(2)}`;
break;
default:
sums[index] = '';
@ -1947,7 +2048,8 @@
}
</script>
<style scoped>
<style lang="scss" >
.warning-row td{
color: darkred !important;
}
</style>

106
src/views/modules/ecss/codelnotifyConfirm.vue

@ -46,6 +46,9 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="改单">
<el-checkbox v-model="searchData.modifyData" true-label="true" false-label="false" @change="searchTable()"></el-checkbox>
</el-form-item>
<el-form-item :label="' '" >
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
</el-form-item>
@ -57,13 +60,13 @@
:height="height"
:data="dataList"
ref="mainTable"
border
border :cell-style="cellStyle"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
header-align="center"
align="center"
width="150"
width="100"
fixed="left"
label="操作">
<template slot-scope="scope">
@ -103,7 +106,7 @@
<el-table
:height="height"
:data="dataList2"
border
border :cell-style="cellStyleDetail"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList2" :key="index"
@ -135,9 +138,10 @@
</el-tab-pane>
<el-tab-pane label="手工装箱" name="box">
<el-button v-show="dataList4.length===0" @click="oneClickPacking()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'一键装箱'}}</el-button>
<el-button v-show="dataList4.length===0" @click="upLoadPallet()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入装箱单'}}</el-button>
<el-button @click="oneClickPacking()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'一键装箱'}}</el-button>
<el-button @click="upLoadPallet()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入装箱单'}}</el-button>
<el-button @click="newPalletModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'装箱'}}</el-button>
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导出模版'}}</el-button>
<el-table
:data="dataList4"
:height="height"
@ -307,10 +311,10 @@
</el-footer>
</el-dialog>
<el-dialog title="修改" :close-on-click-modal="false" v-drag :visible.sync="updateModelFlag" width="260px">
<el-dialog title="修改" :close-on-click-modal="false" v-drag :visible.sync="updateModelFlag" width="350px">
<el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="24">
<el-col :span="12">
<el-form-item :label="'ReadyDate'" >
<el-date-picker
style="width: 100%"
@ -322,6 +326,18 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'预计发货日期'" >
<el-date-picker
style="width: 100%"
v-model="confirmModel.notifyDate"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -622,6 +638,8 @@
searchPalletList
}from "@/api/ecss/ecss.js"
import {getBuList}from '@/api/factory/site.js'
import excel from "@/utils/excel-util.js";
import excelOpts from '@/utils/export-options.js'
export default {
name: "null",
components:{
@ -746,7 +764,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 60
},
{
userId: this.$store.state.user.name,
@ -874,6 +892,24 @@
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table1NotifyStatus',
tableId: "801001Table1",
tableName: "关务系统发货通知单",
columnProp: "modifyLabel",
headerAlign: "center",
align: "left",
columnLabel: "改单",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
@ -1975,6 +2011,14 @@
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
this.dataList.forEach(o => {
if (o.notifyStatus==='仓库已确认'&&!o.notifyDate) {
o.notifyDate='发货日期不确定'
}
this.dataList.forEach(o => {
o.modifyLabel = !!o.modifyFlag?'是':'';
});
});
}else {
this.changeData(null)
}
@ -1983,6 +2027,21 @@
}
});
},
cellStyle({row, column }) {
if (column.property === 'notifyDate' && row.notifyDate==='发货日期不确定') { //
return { color: '#ff5d03' };
}
if (column.property === 'modifyLabel' && row.modifyLabel==='是') { //
return { color: '#ff5d03' };
}
return {};
},
cellStyleDetail({row, column }) {
if ((column.property === 'pn' || column.property === 'qty') && row.modifyFlag===true) { //
return { color: '#ff5d03' };
}
return {};
},
changeData(row){
this.currentRow = JSON.parse(JSON.stringify(row));
this.headerData=row;
@ -2035,12 +2094,12 @@
},
confirmDo(){
if (!this.confirmModel.notifyDate) {
/* if (!this.confirmModel.notifyDate) {
this.$alert('请选择预计发货日期!', '错误', {
confirmButtonText: '确定'
})
return false
}
} */
confirmEcssDel(this.confirmModel).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
@ -2120,12 +2179,12 @@
})
},
upLoadPallet(){
if(this.dataList3.length>0){
/* if(this.dataList3.length>0){
this.$alert('已经有明细无法再次导入请去手工装箱全部删除!', '错误', {
confirmButtonText: '确定'
})
return false
}
} */
if(this.currentRow.site===''||this.currentRow.site==null){
this.$alert('请先选择发货通知单!', '错误', {
confirmButtonText: '确定'
@ -2149,6 +2208,25 @@
this.$refs.palletUploadExcel.init(inData)
})
},
async exportExcel() {
let searchData={
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
cmcInvoice: this.currentRow.cmcInvoice,
createBy: this.$store.state.user.name,
}
excel.exportTable({
url: "/select/ecssMapper/searchEcssCoDelNotifyDetail/list",
columnMapping: excelOpts.PalletSku.columnMapping,//table
mergeSetting: [],//
params: searchData,
fileName: "装箱数据导入模版.xlsx",
rowFetcher: res => res.data,
columnFormatter: [],
dropColumns: [],//dropColumns: ["netWeight"]
});
},
searchPalletTable(){
this.refreshCurrentTabTable();
},
@ -2417,12 +2495,12 @@
})
return false
}
if(this.dataList4.length>0){
/* if(this.dataList4.length>0){
this.$alert('已存在装箱数据,不可一键装箱!', '错误', {
confirmButtonText: '确定'
})
return false
}
} */
this.oneClickPackingModelData={
addFlag:0,
site:this.currentRow.site,

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

@ -63,7 +63,7 @@
:height="height"
:data="dataList"
ref="mainTable"
border
border :cell-style="cellStyle"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
@ -544,7 +544,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 60
},
{
userId: this.$store.state.user.name,
@ -616,7 +616,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
columnWidth: 220
},
{
userId: this.$store.state.user.name,
@ -1551,6 +1551,11 @@
if(this.dataList.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList[0]);
this.changeData(this.dataList[0])
this.dataList.forEach(o => {
if (o.notifyStatus==='仓库已确认'&&!o.notifyDate) {
o.notifyDate='发货日期不确定'
}
});
}else {
this.changeData(null)
}
@ -1559,6 +1564,12 @@
}
});
},
cellStyle({row, column }) {
if (column.property === 'notifyDate' && row.notifyDate==='发货日期不确定') { //
return { color: '#ff5d03' };
}
return {};
},
changeData(row){
this.currentRow = JSON.parse(JSON.stringify(row));
this.headerData=row;

18
src/views/modules/ecss/ecssWalMartOrder.vue

@ -10,6 +10,7 @@
<el-form-item :label="' '" >
<el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'查询'}}</el-button>
<el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入'}}</el-button>
<el-button @click="newModelOpen()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button>
</el-form-item>
</el-form>
@ -61,7 +62,7 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="编辑" :close-on-click-modal="false" v-drag :visible.sync="addModelFlag" width="500px">
<el-dialog title="沃尔玛信息维护" :close-on-click-modal="false" v-drag :visible.sync="addModelFlag" width="500px">
<el-form label-position="top" style="margin-left: 2px;margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="12">
@ -422,6 +423,21 @@ import walUploadExcel from "./walmart_upload_excel.vue";
}
})
},
newModelOpen(){
this.addDisabledFlag=false
this.addModel={
addFlag:0,
site:'',
buNo:'03-RFID',
sku:'',
so:'',
qty:'',
rolls:'',
grossWeight:'',
verificationSheet:'',
}
this.addModelFlag=true
},
updateModelOpen(row){
this.addDisabledFlag=false
this.addModel={

2
src/views/modules/ecss/pallet_upload_excel.vue

@ -155,7 +155,7 @@
}
excel.exportTable({
url: "/select/ecssMapper/searchEcssCoDelNotifyDetail/list",
columnMapping: this.columnList1,//table
columnMapping: excelOpts.PalletSku.columnMapping,//table
mergeSetting: [],//
params: searchData,
fileName: this.exportName+".xlsx",

Loading…
Cancel
Save