|
@@ -18,7 +18,7 @@
|
|
|
<Option v-for="(item,index) in product_list" :key="index" :value="item" :label="item"/>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
- <FormItem label='派工时间'>
|
|
|
+ <FormItem label='码单导入时间' :label-width='120'>
|
|
|
<DatePicker type="date" placeholder="年/月/日" style="width: 200px" v-model="searchData.start_time"></DatePicker>~
|
|
|
<DatePicker type="date" placeholder="年/月/日" style="width: 200px" v-model="searchData.end_time"></DatePicker>
|
|
|
</FormItem>
|
|
@@ -31,7 +31,7 @@
|
|
|
<Checkbox v-model="item.is_select" @on-change='itemSelect($event,item,index)'></Checkbox>
|
|
|
<span>图号:{{item.url_number}}</span>
|
|
|
<span>产品名称:{{item.product_title}}</span>
|
|
|
- <span>派工时间:{{item.crt_time?func.replaceDateNoHMS(item.crt_time):''}}</span>
|
|
|
+ <span>码单导入时间:{{item.crt_time?func.replaceDateNoHMS(item.crt_time):''}}</span>
|
|
|
</div>
|
|
|
<div class="table_header_right">
|
|
|
<div @click="show(item,index)" style="cursor: pointer;"><span style="font-size:16px;">{{item.showType?'收缩':'展开'}}</span><Icon type="md-arrow-dropright" ref="ico" class="ico"/></div>
|
|
@@ -54,13 +54,13 @@
|
|
|
<FormItem><Button type="primary" @click="initUnderData(underFormData)">搜索</Button></FormItem>
|
|
|
</Form>
|
|
|
</div>
|
|
|
- <Table :columns="tableColumns" border :data="tableData" max-height="450">
|
|
|
+ <Table :columns="tableColumns" border :data="tableData" max-height="450" show-summary :summary-method="handleSummary">
|
|
|
</Table>
|
|
|
</div>
|
|
|
</Card>
|
|
|
|
|
|
</div>
|
|
|
- <Modal title="详情" width='50' v-model="show_total">
|
|
|
+ <!-- <Modal title="详情" width='50' v-model="show_total">
|
|
|
<Form :label-width='100' class="modal_form">
|
|
|
<FormItem label='物料分类:'>
|
|
|
<Input placeholder="请输入物料分类" v-model="modalData.type_title" size="small" class="modal_item" clearable/>
|
|
@@ -88,7 +88,7 @@
|
|
|
<div slot="footer" style="text-align:center">
|
|
|
<Button type="primary" @click="modalBack" style="width:200px">返回</Button>
|
|
|
</div>
|
|
|
- </Modal>
|
|
|
+ </Modal> -->
|
|
|
<Modal title="设置板材原料尺寸" v-model="show_wool" width='20' :closable='false' :mask-closable='false'>
|
|
|
<Form :label-width='100' >
|
|
|
<FormItem label='高:'>
|
|
@@ -115,24 +115,24 @@ export default {
|
|
|
},
|
|
|
show_wool:false,
|
|
|
proxyData:{},
|
|
|
- total:0,
|
|
|
- pageSize:10,
|
|
|
- pageIndex:1,
|
|
|
- modalTableData:[],
|
|
|
- modalTableColumns:[
|
|
|
- {type:'index',title:'序号',align:'center',minWidth:80},
|
|
|
- {title:'物料分类',key:'type_title',minWidth:100,align:'center'},
|
|
|
- {title:'物料名称',key:'material_title',minWidth:100,align:'center'},
|
|
|
- {title:'计量单位',key:'unit',minWidth:100,align:'center'},
|
|
|
- {title:'数量',key:'num',minWidth:100,align:'center'},
|
|
|
- ],
|
|
|
- modalData:{
|
|
|
- type_title:'',
|
|
|
- material_title:''
|
|
|
- },
|
|
|
+ // total:0,
|
|
|
+ // pageSize:10,
|
|
|
+ // pageIndex:1,
|
|
|
+ // modalTableData:[],
|
|
|
+ // modalTableColumns:[
|
|
|
+ // {type:'index',title:'序号',align:'center',minWidth:80},
|
|
|
+ // {title:'物料分类',key:'type_title',minWidth:100,align:'center'},
|
|
|
+ // {title:'物料名称',key:'material_title',minWidth:100,align:'center'},
|
|
|
+ // {title:'计量单位',key:'unit',minWidth:100,align:'center'},
|
|
|
+ // {title:'数量',key:'num',minWidth:100,align:'center'},
|
|
|
+ // ],
|
|
|
+ // modalData:{
|
|
|
+ // type_title:'',
|
|
|
+ // material_title:''
|
|
|
+ // },
|
|
|
show_total:false,
|
|
|
tableColumns:[
|
|
|
- {title:'序号',type:'index',align:'center',minWidth:60},
|
|
|
+ {title:'序号',type:'index',align:'center',minWidth:66},
|
|
|
{title:'物料分类',align:'center',minWidth:100,key:'type_title'},
|
|
|
{title:'物料名称',align:'center',minWidth:150,key:'material_title'},
|
|
|
// {title:'规格型号',align:'center',minWidth:150,key:'measure',render:(h,params)=>{
|
|
@@ -143,7 +143,8 @@ export default {
|
|
|
{title:'原料尺寸',align:'center',minWidth:150,key:'storage_size'},
|
|
|
{title:'计量单位',align:'center',minWidth:80,key:'unit'},
|
|
|
{title:'精裁面积',align:'center',minWidth:150,key:'cut_area'},
|
|
|
- {title:'数量',align:'center',minWidth:80,key:'num'},
|
|
|
+ {title:'建议数量',align:'center',minWidth:80,key:'num'},
|
|
|
+ {title:'排版数量',align:'center',minWidth:80,key:'num2'},
|
|
|
],
|
|
|
tableData:[],
|
|
|
selectData:[],
|
|
@@ -178,9 +179,48 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
mounted(){
|
|
|
+ this.handleWoolModal();
|
|
|
this.initData();
|
|
|
},
|
|
|
methods:{
|
|
|
+ handleSummary ({ columns, data }) {
|
|
|
+ const sums = {};
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ const key = column.key;
|
|
|
+ if (index === 0) {
|
|
|
+ sums[key] = {
|
|
|
+ key,
|
|
|
+ value: '总价'
|
|
|
+ };
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const values = data.map(item => Number(item[key]));
|
|
|
+
|
|
|
+ // if (!values.every(value => isNaN(value))) {
|
|
|
+ if(key==='cut_area'||key==='num'||key==='num2'){
|
|
|
+ const v = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ sums[key] = {
|
|
|
+ key,
|
|
|
+ value: v
|
|
|
+ };
|
|
|
+ }else{
|
|
|
+ sums[key] = {
|
|
|
+ key,
|
|
|
+ value:''
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
sureWoolSize(){
|
|
|
this.show_wool = false;
|
|
|
let obj = JSON.stringify(this.woolModalData);
|
|
@@ -198,11 +238,11 @@ export default {
|
|
|
|
|
|
this.show_wool = true;
|
|
|
},
|
|
|
- modalBack(){
|
|
|
- this.show_total = false;
|
|
|
- this.modalData.type_title = '';
|
|
|
- this.modalData.material_title = '';
|
|
|
- },
|
|
|
+ // modalBack(){
|
|
|
+ // this.show_total = false;
|
|
|
+ // this.modalData.type_title = '';
|
|
|
+ // this.modalData.material_title = '';
|
|
|
+ // },
|
|
|
changePage(e){
|
|
|
this.pageIndex = e;
|
|
|
},
|
|
@@ -218,14 +258,15 @@ export default {
|
|
|
this.selectData.forEach(v=>{
|
|
|
url_number.push(v.url_number);
|
|
|
})
|
|
|
- this.axios.post('/api/finance_quota_detail_material_total',{url_number,order_no:this.$route.query.order_no,...data,...this.woolModalData}).then(res=>{
|
|
|
- if(res.code == 200){
|
|
|
- this.modalTableData = res.data.data;
|
|
|
- this.total = res.data.total;
|
|
|
- this.show_total = true;
|
|
|
- }
|
|
|
+ this.$router.push({path:'/cms/BidSystem/QuotaRequisition/detail',query:{url_number,order_no:this.$route.query.order_no,...this.woolModalData}})
|
|
|
+ // this.axios.post('/api/finance_quota_detail_material_total',{url_number,order_no:this.$route.query.order_no,...data,...this.woolModalData}).then(res=>{
|
|
|
+ // if(res.code == 200){
|
|
|
+ // this.modalTableData = res.data.data;
|
|
|
+ // this.total = res.data.total;
|
|
|
+ // this.show_total = true;
|
|
|
+ // }
|
|
|
|
|
|
- })
|
|
|
+ // })
|
|
|
|
|
|
},
|
|
|
itemSelect(e,item,index){
|