Commit b75b8de8 authored by godwithdh's avatar godwithdh

往来单位

parents 802299e6 a8a589ff
...@@ -103,7 +103,7 @@ util.deepClone = function (data) { ...@@ -103,7 +103,7 @@ util.deepClone = function (data) {
} }
util.dateFormat = function (str, fmt) { util.dateFormat = function (str, fmt) {
var usedDate = new Date(str); var usedDate = new Date(util.getType(str) == 'string' ? str.split('.')[0].replace(/-/g, "/") : str);
var o = { var o = {
"M+": usedDate.getMonth() + 1, //月份 "M+": usedDate.getMonth() + 1, //月份
"d+": usedDate.getDate(), //日 "d+": usedDate.getDate(), //日
......
...@@ -236,7 +236,6 @@ export default { ...@@ -236,7 +236,6 @@ export default {
this.list = []; this.list = [];
}, },
async routerToDetail(){ async routerToDetail(){
console.log(this.row.sProduceArtInfo)
this.$store.dispatch('saveCheckProgressHdr',{ this.$store.dispatch('saveCheckProgressHdr',{
type:'process', type:'process',
row:this.row row:this.row
......
...@@ -270,7 +270,34 @@ export default { ...@@ -270,7 +270,34 @@ export default {
this.list[res.trIndex].dReceivedDate = Util.dateFormat(this.list[res.trIndex].dReceivedDate,'yyyy-MM-dd'); this.list[res.trIndex].dReceivedDate = Util.dateFormat(this.list[res.trIndex].dReceivedDate,'yyyy-MM-dd');
this.$store.dispatch('searchOrderSaveHdr',this.list[res.trIndex]); this.$store.dispatch('searchOrderSaveHdr',this.list[res.trIndex]);
this.$router.push({name:'searchOrderTrack'}) this.$router.push({name:'searchOrderTrack'})
}else if(this.hdr.sType == '采购' || this.hdr.sType == '加工' || this.hdr.sType == '成品入库' || this.hdr.sType == '销售' || this.hdr.sType == '检验' || this.hdr.sType == '收货'){ }else if(this.hdr.sType == '采购' || this.hdr.sType == '加工'){
let postData = [
{key:'url',value:this.hdr.sType == '采购' ? 'Procurement progress' : 'Processing schedule'},
{key:this.hdr.sType == '采购' ? 'begin_date' : 'dBeginDate',value:Util.dateFormat(this.list[res.trIndex].dContractDate,'yyyy-MM-dd')},
{key:this.hdr.sType == '采购' ? 'end_date' : 'dEndDate',value:Util.dateFormat(this.list[res.trIndex].dContractDate,'yyyy-MM-dd') + ' 23:59:59'},
{key:'searchname',value:this.list[res.trIndex].sOrderNo},
]
let result = await this.request(this.hdr.sType == '采购' ? 'getTipProcurementProgress' : 'getTipProcessProgress',{ data:postData, params:{}},'加载中')
result.map(y=>{
y.sContractNoHTML = `<div><span style="text-decoration:underline;">${y.sContractNo}</span></div>`;
y.child.map(x=>{
if(this.hdr.sType == '采购'){
x.dLastStoreInTime = !!x.dLastStoreInTime ? Util.dateFormat(x.dLastStoreInTime,'yyyy-MM-dd') : '';
}else{
x.nInputQtyRate = (x.nInputQtyRate * 100).toFixed(2) + '%';
x.tDropInTime = !!x.tDropInTime ? Util.dateFormat(x.tDropInTime,'yyyy-MM-dd') : '';
x.tProductOutTime = !!x.tProductOutTime ? Util.dateFormat(x.tProductOutTime,'yyyy-MM-dd') : '';
}
})
});
this.$store.dispatch('saveCheckProgressHdr',{
type:this.hdr.sType == '采购' ? 'procurement' : 'process',
row:result[0]
});
this.$router.push({name:this.hdr.sType == '采购' ? 'tipProcurementProgressDetail' : 'tipProcessProgressDetail'})
}else if(this.hdr.sType == '加工'){
}else if( this.hdr.sType == '成品入库' || this.hdr.sType == '销售' || this.hdr.sType == '检验' || this.hdr.sType == '收货'){
await this.getDetail(1,this.hdr.sType,this.list[res.trIndex].sOrderNo); await this.getDetail(1,this.hdr.sType,this.list[res.trIndex].sOrderNo);
}else if(this.hdr.sType == '供应商索赔' || this.hdr.sType == '超期应付'){ }else if(this.hdr.sType == '供应商索赔' || this.hdr.sType == '超期应付'){
await this.getDetail(2,this.hdr.sType,this.list[res.trIndex].sPayableNO); await this.getDetail(2,this.hdr.sType,this.list[res.trIndex].sPayableNO);
......
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