Commit e63b5c7a authored by 张锡奇's avatar 张锡奇

upload

parent 0b1db15a
......@@ -165,7 +165,7 @@
</div>
<div class="_tfoot" ref="tfoot" @scroll="scrollTFoot" v-if="showFooter & footerData.length > 0">
<tr v-for="(x,i) in footerData" :key="i" :style="{'width':'100%','min-width':tableStyle.width}">
<tr v-for="(x,i) in footerData" :key="i" :style="{'width':'100%','min-width':tableStyle.width,'min-height':'60px'}">
<td
v-for="(item,index) in columns"
:key="index"
......@@ -175,11 +175,13 @@
'min-width':item.width,
'background':tableStyle.theadBgColor,
'position': item.fixed ? 'sticky' : 'static',
'min-height':'60px',
'left':item.fixed ? item.fixedLeftWidth : 'none',
'border-top':tableStyle.theadTdBorder ? tableStyle.tbodyTrBorderBottom : '0px',
'border-left':tableStyle.theadTdBorder ? tableStyle.tbodyTrBorderBottom : '0px',
'border-bottom':tableStyle.theadTdBorder ? tableStyle.tbodyTrBorderBottom : '0px',
'border-right':(index == columns.length - 1 && tableStyle.theadTdBorder) ? tableStyle.tbodyTrBorderBottom : '0px',
'text-decoration':'none'
}"
v-html="x[item.field]"
>
......
......@@ -12,9 +12,9 @@ function urlFun(name){
/**
* 默认公司
*/
default:`http://192.168.4.31:5001`,
default:`http://192.168.4.34:5001`,
// default:`https://weixin.huansi.net/apiproxy/huansi/hszh_HSFabricTradeTest`,
default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
// default:`https://weixin.huansi.net/apiproxy/huansi/service/proxy/${userID}`,
/**
* 基本地址
......
......@@ -15,7 +15,7 @@
<template>
<div id="tiipOperateCustomDetail">
<div class="Table">
<customerTable :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
<customerTable :showFooter="true" :columns="columns" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
</div>
</template>
......@@ -37,11 +37,13 @@ export default {
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh)',
tbodyHeight:'calc(100vh - 60px)',
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%'
},
type:'custom'
type:'custom',
page:1,
per_page:50
}
},
computed:{
......@@ -54,6 +56,8 @@ export default {
window.d = this;
},
async activated(){
this.page = 1;
this.per_page = 50;
this.type = this.$route.params.type;
if(this.hdr.sType == '采购'){
this.$store.dispatch("CAHNGE_META_INFO", {title:(this.type == 'custom' ? '采购' : '产品') + '订单列表'});
......@@ -108,6 +112,7 @@ export default {
field:this.hdr.sType == '供应商索赔' ? 'sPayableNO' : 'sReceivableNO',
underline:true,
color:'#2d8cf0',
field:this.hdr.sType == '供应商索赔' ? params.row.sPayableNO : params.row.sReceivableNO,
render: (h,params) => {
return h('span',{
style: {
......@@ -145,6 +150,7 @@ export default {
align:'center',
underline:true,
color:'#2d8cf0',
field:'sStoreInNo',
render: (h,params) => {
return h('span',{
style: {
......@@ -187,6 +193,7 @@ export default {
field:this.hdr.sType == '超期应付' ? 'sPayableNO' : 'sReceivableNO',
underline:true,
color:'#2d8cf0',
field:this.hdr.sType == '超期应付' ? params.row.sPayableNO : params.row.sReceivableNO,
render: (h,params) => {
return h('span',{
style: {
......@@ -277,14 +284,23 @@ export default {
await this.getDetail(2,this.hdr.sType,this.list[res.trIndex].sStoreOutNo);
}
})
this.global.$off('scrollTable');
this.global.$on('scrollTable',async ()=>{
this.getData(true)
})
},
methods:{
async getData(){
async getData(flag){
if(this.per_page < 50){
this.$vux.toast.text('已加载全部数据!', 'middle')
return false;
}
let postData = [
{key:"url",value:this.type == 'custom' ? 'Operation gai sType-customer-sOrder' : 'Operation gai sType-material-sOrder'},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
{key:"end_date",value:this.hdr.end_date},
];
if(this.type == 'custom'){
if(this.hdr.sType == '采购退货' || this.hdr.sType == '采购' || this.hdr.sType == '加工' || this.hdr.sType == '检验' || this.hdr.sType == '收货' || this.hdr.sType == '成品入库' || this.hdr.sType == '加工回修'){
......@@ -309,22 +325,32 @@ export default {
}
let res = await this.request('getBoss',{
data:postData,
params:{},
params:{
page:this.page,
per_page:this.per_page
},
},'加载中',{})
res.map(x=>{
x.sOrderNoHTML = `<div><span style="text-decoration:underline;">${x.sOrderNo}</span></div>`;
res.map((x,y)=>{
x.sOrderNoHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sOrderNo}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
if(this.hdr.sType == '销售退货' || this.hdr.sType == '采购退货'){
x.nQtyHTML = `<div><span">${this.hdr.sType == '销售退货' ? x.nSumInQty :x.nSumOutQty}</span></div>`;
x.nPieceHTML = `<div><span">${this.hdr.sType == '销售退货' ? x.nInPieceQty :x.nOutPieceQty}</span></div>`;
if(this.hdr.sType == '销售退货'){
x.sStoreInNoHTML = `<div><span style="text-decoration:underline;">${x.sStoreInNo}</span></div>`;
x.sStoreInNoHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sStoreInNo}</span></div>`;
}else{
x.sStoreOutNoHTML = `<div><span style="text-decoration:underline;">${x.sStoreOutNo}</span></div>`;
x.sStoreOutNoHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sStoreOutNo}</span></div>`;
}
}
})
if(flag){
this.list.splice(this.list.length - 1,1);
this.list = this.list.concat(res);
}else{
this.list = res;
}
this.page++;
this.per_page = res.length - 1;
},
async getDetail(mode,sType,sOrderNo){
let postData = [
......
......@@ -77,7 +77,7 @@
<span v-for="(item,index) in tabList" :key="index" :class="[activeTab==item.key?'active':'']" @click="changeTab(item.key)">{{item.value}}</span>
</div>
<div class="Table">
<customerTable :columns="activeTab == 0 ? columns : columns1" :list="list" :tableStyle="tableStyle"></customerTable>
<customerTable :showFooter="true" :columns="activeTab == 0 ? columns : columns1" :list="list" :tableStyle="tableStyle"></customerTable>
</div>
</div>
</template>
......@@ -100,13 +100,39 @@ export default {
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100%)',
tbodyHeight:'calc(100vh - 50px - 60px)',
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%'
},
activeTab:0,
tabList:[],
columns1:[
columns1:[],
showTab:true,
page:1,
per_page:50
}
},
computed:{
...mapState({
hdr:state => state.kanban.hdr,
isRefresh:state => state.app.isRefresh
})
},
async mounted(){
window.d = this;
},
async activated(){
this.page = 1;
this.per_page = 50;
this.showTab = true;
if(this.isRefresh){
this.activeTab = 0;
this.$store.dispatch('saveRefresh',false);
}
this.tableStyle.tbodyHeight = 'calc(100vh - 50px - 60px)';
this.$store.dispatch("CAHNGE_META_INFO", {title:this.hdr.sType + '详情'});
await this.getData();
this.columns1 = [
{
width:'40%',
name:'产品',
......@@ -127,28 +153,7 @@ export default {
align:'center',
field:'nAmountHTML',
}
],
showTab:true
}
},
computed:{
...mapState({
hdr:state => state.kanban.hdr,
isRefresh:state => state.app.isRefresh
})
},
async mounted(){
window.d = this;
},
async activated(){
this.showTab = true;
if(this.isRefresh){
this.activeTab = 0;
this.$store.dispatch('saveRefresh',false);
}
this.$store.dispatch("CAHNGE_META_INFO", {title:this.hdr.sType + '详情'});
await this.getData();
]
if(this.hdr.sType == '采购'){
this.tabList = [
{
......@@ -231,6 +236,7 @@ export default {
]
}else if(this.hdr.sType == '检验'){
this.showTab = false;
this.tableStyle.tbodyHeight = 'calc(100vh - 60px)';
this.columns = [
{
width:'25%',
......@@ -408,6 +414,7 @@ export default {
]
}else if(this.hdr.sType == '供应商索赔' || this.hdr.sType == '客户索赔'){
this.showTab = false;
this.tableStyle.tbodyHeight = 'calc(100vh - 60px)';
this.columns = [
{
width:'25%',
......@@ -482,6 +489,7 @@ export default {
width:'20%',
name:'匹数',
align:'center',
field:'nStockPieceQty',
render: (h,params) => {
return h('span',params.row.nStockPieceQty)
}
......@@ -490,8 +498,9 @@ export default {
width:'20%',
name:'数量',
align:'center',
field:'nStockQty',
render: (h,params) => {
return h('span',params.row.nStockPieceQty)
return h('span',params.row.nStockQty)
}
},
{
......@@ -547,6 +556,7 @@ export default {
width:'20%',
name:'数量',
align:'center',
field:'nQty',
render: (h,params) => {
return h('span',params.row.nQty)
}
......@@ -610,6 +620,7 @@ export default {
width:'20%',
name:'匹数',
align:'center',
field:'nStockPieceQty',
render: (h,params) => {
return h('span',params.row.nStockPieceQty)
}
......@@ -618,8 +629,9 @@ export default {
width:'20%',
name:'数量',
align:'center',
field:'nStockQty',
render: (h,params) => {
return h('span',params.row.nStockPieceQty)
return h('span',params.row.nStockQty)
}
},
{
......@@ -672,6 +684,8 @@ export default {
]
}
this.global.$off('clickTd');
this.global.$off('scrollTable');
//点击表格列触发
this.global.$on('clickTd',async(res)=>{
if(res.tdIndex == 0){
......@@ -687,10 +701,16 @@ export default {
this.$router.push({name:'tiipOperateSaleDetail'})
}
})
//滚动加载
this.global.$on('scrollTable',async ()=>{
this.getData(true)
})
},
methods:{
changeTab(key){
this.activeTab = key;
this.page = 1;
this.per_page = 50;
if(this.hdr.sType == '加工'){
this.columns1 = this.columns;
}else{
......@@ -698,12 +718,16 @@ export default {
}
this.getData();
},
async getData(){
async getData(flag){
if(this.per_page < 50){
this.$vux.toast.text('已加载全部数据!', 'middle')
return false;
}
let postData = [
{key:"url",value:this.activeTab == '0' ? "Operation gai sType-customer" : 'Operation gai sType-material'},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
{key:"end_date",value:this.hdr.end_date},
]
if(this.activeTab == '0'){
postData[0].value = 'Operation gai sType-customer';
......@@ -722,26 +746,33 @@ export default {
}
let res = await this.request('getBoss',{
data:postData,
params:{},
params:{
page:this.page,
per_page:this.per_page
},
},'加载中',{})
if(this.activeTab == 1 && this.hdr.sType != '加工'){
res.map(x=>{
res.map((x,y)=>{
if(this.hdr.sType == '销售退货' || this.hdr.sType == '采购退货'){
x.nQtyHTML = `<div><span">${this.hdr.sType == '销售退货' ? x.nSumInQty :x.nSumOutQty}</span></div>`;
x.nPieceHTML = `<div><span">${this.hdr.sType == '销售退货' ? x.nInPieceQty :x.nOutPieceQty}</span></div>`;
}else{
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty || x.nInQty}</span></div>`;
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty || x.nInQty || 0}</span></div>`;
}
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
x.sMaterial = `<div><span style="color:#FF6633">${x.sSampleMaterialNo || ''}</span><br><span style="color:black;">${this.hdr.sType == '成品入库' ? x.sMaterialName || '' : x.sSampleMaterialName || ''}</span></div>`
if(y == res.length - 1){
x.sMaterial = `<div><span style="color:black;">${ x.sSampleMaterialName || ''}</span></div>`
}else{
x.sMaterial = `<div><span style="color:#FF6633">${x.sSampleMaterialNo || ''}</span><br><span style="color:black;">${x.sSampleMaterialName || ''}</span></div>`
}
})
}else{
res.map(x=>{
res.map((x,y)=>{
if(this.hdr.sType == '销售退货' || this.hdr.sType == '采购退货'){
if(this.hdr.sType == '销售退货'){
x.sCustomerNameHTML = `<div><span style="text-decoration:underline;">${x.sCustomerName}</span></div>`;
x.sCustomerNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sCustomerName}</span></div>`;
}else if(this.hdr.sType == '采购退货'){
x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName}</span></div>`;
x.sProviderNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sProviderName}</span></div>`;
}
x.nQtyHTML = `<div><span">${this.hdr.sType == '销售退货' ? x.nSumInQty :x.nSumOutQty}</span></div>`;
x.nPieceHTML = `<div><span">${this.hdr.sType == '销售退货' ? x.nInPieceQty :x.nOutPieceQty}</span></div>`;
......@@ -750,24 +781,32 @@ export default {
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty || 0}</span></div>`;
x.nAmountHTML = `<div><span style="color:red;">${x.nAmount}</span></div>`;
if(this.hdr.sType == '客户索赔'){
x.sCustomerNameHTML = `<div><span style="text-decoration:underline;">${x.sCustomerName}</span></div>`;
x.sCustomerNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sCustomerName}</span></div>`;
}else if(this.hdr.sType == '供应商索赔'){
x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName}</span></div>`;
x.sProviderNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sProviderName}</span></div>`;
}
}else{
x.sCustomerNameHTML = `<div><span style="text-decoration:underline;">${x.sCustomerName || ''}</span></div>`;
x.sProviderNameHTML = `<div><span style="text-decoration:underline;">${x.sProviderName || ''}</span></div>`;
x.sSalesNameHTML = `<div><span style="text-decoration:underline;">${x.sSalesName || ''}</span></div>`;
x.sCustomerNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sCustomerName || ''}</span></div>`;
x.sProviderNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sProviderName || ''}</span></div>`;
x.sSalesNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sSalesName || ''}</span></div>`;
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
x.nQtyHTML = `<div><span">${x.nQty || x.nOutQty || 0}</span></div>`;
x.sMaterialHTML = `<div><span">${x.sSampleMaterialNo || ''}<br>${x.sSampleMaterialName || ''}</span></div>`;
x.sFollowerNameHTML = `<div><span style="text-decoration:underline;">${x.sFollowerName || ''}</span></div>`;
x.sCreatorHTML = `<div><span style="text-decoration:underline;">${x.sCreator || ''}</span></div>`;
x.sFollowerNameHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sFollowerName || ''}</span></div>`;
x.sCreatorHTML = `<div><span style=${y == res.length - 1 ? 'text-decoration:none' : 'text-decoration:underline'}>${x.sCreator || ''}</span></div>`;
}
})
}
if(flag){
this.list.splice(this.list.length - 1,1);
this.list = this.list.concat(res);
}else{
this.list = res;
}
this.page++;
this.per_page = res.length - 1;
}
},
components:{
customerTable,
......
......@@ -62,6 +62,8 @@ export default {
tbodyTrBorderBottom:'1px solid #dbe9f8',
width:'100%'
},
page:1,
per_page:50
}
},
computed:{
......@@ -74,6 +76,8 @@ export default {
window.d = this;
},
async activated(){
this.page = 1;
this.per_page = 50;
await this.getData();
this.global.$off('clickTd');
......@@ -82,14 +86,23 @@ export default {
this.$store.dispatch('saveCustomerItem',this.list[res.trIndex]);
this.$router.push({name:'tiipOperateCustomDetail',params:{type:'custom'}})
})
this.global.$off('scrollTable');
this.global.$on('scrollTable',async ()=>{
this.getData(true)
})
},
methods:{
async getData(){
async getData(flag){
if(this.per_page < 50){
this.$vux.toast.text('已加载全部数据!', 'middle')
return false;
}
let postData = [
{key:"url",value:'Operation gai sType-customer-sales'},
{key:"sType",value:this.hdr.sType},
{key:"begin_date",value:this.hdr.begin_date},
{key:"end_date",value:this.hdr.end_date}
{key:"end_date",value:this.hdr.end_date},
]
if(this.hdr.sType == '采购' || this.hdr.sType == '加工'){
postData.push({key:"upbFollowerGUID",value:this.orderItem.upbFollowerGUID});
......@@ -101,7 +114,10 @@ export default {
let res = await this.request('getBoss',{
data:postData,
params:{},
params:{
page:this.page,
per_page:this.per_page
},
},'加载中',{})
res.map(x=>{
if(this.hdr.sType == '采购' || this.hdr.sType == '加工'){
......@@ -123,8 +139,15 @@ export default {
}
x.nAmountHTML = `<div><span style="color:#339966;">${x.nAmount}</span></div>`;
})
if(flag){
this.list.splice(this.list.length - 1,1);
this.list = this.list.concat(res);
}else{
this.list = res;
}
this.page++;
this.per_page = res.length - 1;
}
},
components:{
customerTable,
......
......@@ -109,7 +109,7 @@ export default {
singleTrBgColor:'#eef4fe',
theadTdBorder:false,
tbodyTdBorder:false,
tbodyHeight:'calc(100vh - 160px)',
tbodyHeight:'calc(100vh - 180px)',
tbodyTrBorderBottom:'1px solid #dbe9f8'
},
status:[],
......
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