|
@ -13,7 +13,7 @@ |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button |
|
|
<el-button |
|
|
class="add-button-style" |
|
|
class="add-button-style" |
|
|
@click="handleUpload" |
|
|
|
|
|
|
|
|
@click="importDialogVisable = true" |
|
|
>批量导入 |
|
|
>批量导入 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -105,7 +105,7 @@ |
|
|
@setIsAdd="setIsAdd" |
|
|
@setIsAdd="setIsAdd" |
|
|
@pushData="pushData" /> |
|
|
@pushData="pushData" /> |
|
|
<Upload |
|
|
<Upload |
|
|
v-if="isUpload" |
|
|
|
|
|
|
|
|
v-model="importDialogVisable" |
|
|
@editCallBack="completeCallBack" /> |
|
|
@editCallBack="completeCallBack" /> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
@ -114,7 +114,7 @@ |
|
|
import Add from "./add.vue"; |
|
|
import Add from "./add.vue"; |
|
|
import Upload from "./upload.vue"; |
|
|
import Upload from "./upload.vue"; |
|
|
import { ListMixin } from "@/mixins/newListMixin"; |
|
|
import { ListMixin } from "@/mixins/newListMixin"; |
|
|
import { getCustomerList ,getCustartlist,customerorderreviewlist,exportExcel } from "@/server/plan/workbench/customerInquiry"; |
|
|
|
|
|
|
|
|
import { getCustomerList ,customerorderreviewlist,exportExcel } from "@/server/plan/workbench/customerInquiry"; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
Add, |
|
|
Add, |
|
@ -126,7 +126,7 @@ export default { |
|
|
tableHeight:0, |
|
|
tableHeight:0, |
|
|
loading: false, |
|
|
loading: false, |
|
|
isAdd: false, |
|
|
isAdd: false, |
|
|
isUpload: false, |
|
|
|
|
|
|
|
|
importDialogVisable: false, |
|
|
deliveryTrialDisable:false, |
|
|
deliveryTrialDisable:false, |
|
|
isShowDialog: '', |
|
|
isShowDialog: '', |
|
|
detailHeaders: [], |
|
|
detailHeaders: [], |
|
@ -141,6 +141,7 @@ export default { |
|
|
"CustomerOrderReviewInfo-ExpectedDate", |
|
|
"CustomerOrderReviewInfo-ExpectedDate", |
|
|
"CustomerOrderReviewInfo-ReplyDate" |
|
|
"CustomerOrderReviewInfo-ReplyDate" |
|
|
], |
|
|
], |
|
|
|
|
|
tableData:[], |
|
|
customerList:[], |
|
|
customerList:[], |
|
|
custartList:[], |
|
|
custartList:[], |
|
|
multipleSelection: [], |
|
|
multipleSelection: [], |
|
@ -150,12 +151,9 @@ export default { |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
handleExport(){ |
|
|
handleExport(){ |
|
|
// let queryData = this.tableData.map(item => { |
|
|
|
|
|
// item['CustomerOrderReviewInfo-ExpectedDate'] = this.dealDate(item['CustomerOrderReviewInfo-ExpectedDate']) |
|
|
|
|
|
// item['CustomerOrderReviewInfo-ReplyDate'] = this.dealDate(item['CustomerOrderReviewInfo-ReplyDate']) |
|
|
|
|
|
// return item |
|
|
|
|
|
// }) |
|
|
|
|
|
// console.log('%cindex.vue line:156 queryData', 'color: #007acc;', queryData); |
|
|
|
|
|
|
|
|
this.tableData.forEach(item => { |
|
|
|
|
|
item['CustomerOrderReviewInfo-Qty'] = parseFloat(item['CustomerOrderReviewInfo-Qty']) |
|
|
|
|
|
}) |
|
|
exportExcel(this.tableData).then(res => { |
|
|
exportExcel(this.tableData).then(res => { |
|
|
let link = document.createElement('a'); |
|
|
let link = document.createElement('a'); |
|
|
link.style.display = 'none'; |
|
|
link.style.display = 'none'; |
|
@ -165,24 +163,12 @@ export default { |
|
|
link.click(); |
|
|
link.click(); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 上传 |
|
|
|
|
|
handleUpload() { |
|
|
|
|
|
this.isUpload = true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 上传回调 |
|
|
// 上传回调 |
|
|
completeCallBack(dataList) { |
|
|
completeCallBack(dataList) { |
|
|
this.tableData = dataList |
|
|
this.tableData = dataList |
|
|
// dataList.forEach(item => { |
|
|
|
|
|
// let date = new Date(item['CustomerOrderReviewInfo-ExpectedDate']); |
|
|
|
|
|
// this.tableData.push({ |
|
|
|
|
|
// "CustomerOrderReviewInfo-ArtId" : item['CustomerOrderReviewInfo-ArtId'], |
|
|
|
|
|
// "CustomerOrderReviewInfo-CustomerId" : item['CustomerOrderReviewInfo-CustomerId'], |
|
|
|
|
|
// "CustomerOrderReviewInfo-ExpectedDate" : date.getFullYear() + '.' + (date.getMonth() + 1) + '.' + date.getDate(), |
|
|
|
|
|
// "CustomerOrderReviewInfo-Qty" : item['CustomerOrderReviewInfo-Qty'] |
|
|
|
|
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
// }) |
|
|
|
|
|
this.isUpload = false |
|
|
|
|
|
|
|
|
this.showUploadDailog = false |
|
|
}, |
|
|
}, |
|
|
// 工厂列表 |
|
|
// 工厂列表 |
|
|
getCustomerList(){ |
|
|
getCustomerList(){ |
|
@ -190,15 +176,8 @@ export default { |
|
|
this.customerList=data; |
|
|
this.customerList=data; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 工厂列表 |
|
|
|
|
|
getCustartlist(){ |
|
|
|
|
|
getCustartlist().then(({data=[]})=>{ |
|
|
|
|
|
this.custartList=data; |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 是否显示编辑/新增界面 |
|
|
// 是否显示编辑/新增界面 |
|
|
setIsAdd(value) { |
|
|
setIsAdd(value) { |
|
|
console.log('%cindex.vue line:147 setIsAdd value', 'color: #007acc;', value); |
|
|
|
|
|
this.isAdd = value; |
|
|
this.isAdd = value; |
|
|
}, |
|
|
}, |
|
|
pushData(data){ |
|
|
pushData(data){ |
|
@ -241,7 +220,7 @@ export default { |
|
|
this.detailHeaders = [] |
|
|
this.detailHeaders = [] |
|
|
this.detailTableData = [] |
|
|
this.detailTableData = [] |
|
|
res.data.forEach( (item,index) => { |
|
|
res.data.forEach( (item,index) => { |
|
|
this.multipleSelection[index]["CustomerOrderReviewInfo-ReplyDate"] = item['CustomerOrderReviewInfo-ReplyDate'].replaceAll("-",".") |
|
|
|
|
|
|
|
|
this.tableData[index]["CustomerOrderReviewInfo-ReplyDate"] = item['CustomerOrderReviewInfo-ReplyDate'] |
|
|
}) |
|
|
}) |
|
|
this.deliveryTrialDisable = false |
|
|
this.deliveryTrialDisable = false |
|
|
} |
|
|
} |
|
@ -256,7 +235,7 @@ export default { |
|
|
"CustomerOrderReviewInfo-Qty": parseFloat(row['CustomerOrderReviewInfo-Qty']), |
|
|
"CustomerOrderReviewInfo-Qty": parseFloat(row['CustomerOrderReviewInfo-Qty']), |
|
|
"CustomerOrderReviewInfo-ExpectedDate": row['CustomerOrderReviewInfo-ExpectedDate'] |
|
|
"CustomerOrderReviewInfo-ExpectedDate": row['CustomerOrderReviewInfo-ExpectedDate'] |
|
|
}] |
|
|
}] |
|
|
// let mockData = [{ |
|
|
|
|
|
|
|
|
// searchParam = [{ |
|
|
// "CustomerOrderReviewInfo-CustomerId": "3", |
|
|
// "CustomerOrderReviewInfo-CustomerId": "3", |
|
|
// "CustomerOrderReviewInfo-ArtId": "CAADQ00001A", |
|
|
// "CustomerOrderReviewInfo-ArtId": "CAADQ00001A", |
|
|
// "CustomerOrderReviewInfo-Qty": 1000, |
|
|
// "CustomerOrderReviewInfo-Qty": 1000, |
|
@ -267,18 +246,11 @@ export default { |
|
|
if(res.code === 200 && res.data.length > 0) { |
|
|
if(res.code === 200 && res.data.length > 0) { |
|
|
this.detailHeaders = [] |
|
|
this.detailHeaders = [] |
|
|
this.detailTableData = [] |
|
|
this.detailTableData = [] |
|
|
|
|
|
|
|
|
|
|
|
row["CustomerOrderReviewInfo-ReplyDate"] = res.data[0]['CustomerOrderReviewInfo-ReplyDate'] |
|
|
this.showDetail(res.data[0]) |
|
|
this.showDetail(res.data[0]) |
|
|
row["CustomerOrderReviewInfo-ReplyDate"] = res.data[0]['CustomerOrderReviewInfo-ReplyDate'].replaceAll("-",".") |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 处理日期并补0 |
|
|
|
|
|
// dealDate(dateString){ |
|
|
|
|
|
// let dateArr = dateString.split(".") |
|
|
|
|
|
// return dateArr[0] +"-"+ (Array(2).join(0) + dateArr[1]).slice(-2)+"-"+ (Array(2).join(0) + dateArr[2]).slice(-2) |
|
|
|
|
|
// }, |
|
|
|
|
|
// 显示详情 |
|
|
// 显示详情 |
|
|
showDetail(data){ |
|
|
showDetail(data){ |
|
|
this.detailHeaders.push({"prop":"-","lable":""}) |
|
|
this.detailHeaders.push({"prop":"-","lable":""}) |
|
@ -302,20 +274,16 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created(){ |
|
|
|
|
|
|
|
|
this.getCustomerList() |
|
|
this.getCustomerList() |
|
|
this.getCustartlist() |
|
|
|
|
|
}, |
|
|
}, |
|
|
mounted(){ |
|
|
mounted(){ |
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.tableHeight = this.calculationTableHeight( |
|
|
|
|
|
this.$refs.tableRef, |
|
|
|
|
|
300 |
|
|
|
|
|
); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.tableHeight = this.calculationTableHeight( |
|
|
|
|
|
this.$refs.tableRef, |
|
|
|
|
|
300 |
|
|
|
|
|
); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
<style lang="less" scoped> |
|
|
<style lang="less" scoped> |
|
|