|
|
@@ -1,28 +1,30 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <Toptitle title="图纸导入">
|
|
|
- <Button type="primary" ghost style="margin-right:10px" @click="getPlanData">下计划</Button>
|
|
|
- <Button type="primary" ghost style="margin-right:10px" @click="showURL= true">补图号</Button>
|
|
|
- <Button type="primary" ghost style="margin-right:10px" @click="delURL">批量删除</Button>
|
|
|
- <Button type="primary" ghost style="margin-right:10px" @click="postData">保存</Button>
|
|
|
+ <Toptitle title="编辑">
|
|
|
+ <Button type="primary" @click="searchURL(url_number)" style="margin-right:10px">导入</Button>
|
|
|
+ <!-- <Button type="primary" style="margin-right:10px" @click="getPlanData">下计划</Button> -->
|
|
|
+ <Button type="primary" style="margin-right:10px" @click="showURL= true">补图号</Button>
|
|
|
+ <Button type="primary" style="margin-right:10px" @click="delURL">批量删除</Button>
|
|
|
+ <Button type="primary" @click="back()" style="margin-right:10px">返回</Button>
|
|
|
+ <Button type="primary" @click="postData">保存</Button>
|
|
|
<!-- <Button type="primary" ghost style="margin-right:10px" @click="goDetailPage">统计报表</Button> -->
|
|
|
- <Button type="primary" @click="back()">返回</Button>
|
|
|
+
|
|
|
</Toptitle>
|
|
|
<div style="height:80%;overflow:auto">
|
|
|
<Form style="display:flex;margin-top:15px">
|
|
|
+ <FormItem label='甲方项目编号:' style="width:420px;display:flex;">
|
|
|
+ <Input placeholder="请填写" v-model="another_title" clearable/>
|
|
|
+ </FormItem>
|
|
|
<FormItem label='图号:' style="width:420px;display:flex;" :label-width='50'>
|
|
|
<Input style="width:150px;margin-left:-30px" v-model="url_number.start_number" clearable/>
|
|
|
~
|
|
|
<Input style="width:150px" v-model="url_number.end_number" clearable/>
|
|
|
</FormItem>
|
|
|
- <FormItem>
|
|
|
- <Button type="primary" @click="searchURL(url_number)">导入</Button>
|
|
|
- </FormItem>
|
|
|
</Form>
|
|
|
- <div class="total">
|
|
|
+ <!-- <div class="total">
|
|
|
<span>核量总金额:{{total_quantity_price}}</span>
|
|
|
<span style="margin-right:25px">合同总金额:{{total_contract_price}}</span>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<Table :data='tableData' :columns='tableColumns' border max-height='550'
|
|
|
@on-selection-change='tableSelect'
|
|
|
>
|
|
|
@@ -38,7 +40,7 @@
|
|
|
show-sizer
|
|
|
:page-size='pageSize' />
|
|
|
</div>
|
|
|
- <Modal title="下计划" width='600' v-model="showModal" @on-ok='postPlanData'>
|
|
|
+ <!-- <Modal title="下计划" width='600' v-model="showModal" @on-ok='postPlanData'>
|
|
|
|
|
|
<Form style="margin-top:20px">
|
|
|
<FormItem label='码单时间:' style="width:100%;">
|
|
|
@@ -48,11 +50,11 @@
|
|
|
</FormItem>
|
|
|
<FormItem :label='`${item.title}时间:`' style="width:100%;" v-for="item in planData" :key="item.id"><DatePicker type="date" placeholder='年/月/日' v-model="item.start_time" style="width:30%"/>
|
|
|
~
|
|
|
- <DatePicker type="date" v-model="item.end_time" placeholder='年/月/日' style="width:30%"/></FormItem>
|
|
|
+ <DatePicker type="date" v-model="item.end_time" placeholder='年/月/日' style="width:30%"/></FormItem> -->
|
|
|
<!-- <FormItem label='结束时间:' style="width:100%"><DatePicker type="date" placeholder='年/月/日' style="width:30%"/>~<DatePicker type="date" placeholder='年/月/日' style="width:30%"/></FormItem> -->
|
|
|
- </Form>
|
|
|
+ <!-- </Form>
|
|
|
|
|
|
- </Modal>
|
|
|
+ </Modal> -->
|
|
|
<Modal title="补图号" width='400' v-model="showURL" @on-ok='handleMendUrl'>
|
|
|
|
|
|
<Form style="margin-top:20px">
|
|
|
@@ -66,6 +68,7 @@
|
|
|
export default {
|
|
|
data(){
|
|
|
return {
|
|
|
+ another_title:'',
|
|
|
plan_weight_data:{
|
|
|
start_time:'',
|
|
|
end_time:'',
|
|
|
@@ -76,7 +79,7 @@ export default {
|
|
|
selectData:[],
|
|
|
mend_url_number:'',
|
|
|
showURL:false,
|
|
|
- showModal:false,
|
|
|
+ // showModal:false,
|
|
|
url_number:{
|
|
|
start_number:'',
|
|
|
end_number:''
|
|
|
@@ -87,8 +90,10 @@ export default {
|
|
|
tableData:[],
|
|
|
tableColumns:[
|
|
|
{type:'selection',align:'center',minWidth:50},
|
|
|
- {title:'序号',align:'center',minWidth:80,key:'id'},
|
|
|
+ {title:'序号',align:'center',minWidth:80,type:'index'},
|
|
|
{title:'图号',align:'center',minWidth:80,key:'pic_number'},
|
|
|
+ {title:'产品名称',align:'center',minWidth:80,key:'title'},
|
|
|
+ {title:'平方数',align:'center',minWidth:80,key:'area'},
|
|
|
{title:'合同金额',align:'center',minWidth:90,key:'contract_price',render:(h,params)=>{
|
|
|
const {row,index} = params;
|
|
|
const currentRow = this.tableData[index];
|
|
|
@@ -104,6 +109,23 @@ export default {
|
|
|
currentRow.quantity_price = e.target.value;
|
|
|
this.tableData.splice(index,1,currentRow);
|
|
|
}}})
|
|
|
+ }},
|
|
|
+ {title:'操作',key:'slot',align:'center',minWidth:80,render:(h,params)=>{
|
|
|
+ const {row} = params;
|
|
|
+ return h('a',{on:{'click':()=>{
|
|
|
+ let id = [row.id];
|
|
|
+ this.confirmDelete({
|
|
|
+ content:'是否确定删除所选图号?',
|
|
|
+ then:()=>{
|
|
|
+ this.axios.post('/api/bst_order_pic_number_del',{id}).then(res=>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.$Message.success(res.msg)
|
|
|
+ this.initData();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}},'删除')
|
|
|
}}
|
|
|
]
|
|
|
}
|
|
|
@@ -132,74 +154,74 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getPlanData(){
|
|
|
- // if(this.selectData.length==0){
|
|
|
- // return this.$Message.warning('请先选择图号!')
|
|
|
- // }
|
|
|
- this.axios.get('/api/basics_procedure_index').then(res=>{
|
|
|
- this.planData = res.data.data;
|
|
|
- this.planData.forEach(v=>{
|
|
|
- v.basic_procedure_id = v.id
|
|
|
- v.start_time='';
|
|
|
- v.end_time='';
|
|
|
- })
|
|
|
- this.axios.get('/api/bst_order_pic_number_list',{params:{order_no:this.$route.query.order_no,page_size:1,page_index:1}}).then(resp=>{
|
|
|
- this.planData.forEach(v=>{
|
|
|
- resp.data.plan.forEach(m=>{
|
|
|
- if(v.basic_procedure_id==m.basic_procedure_id){
|
|
|
- v.start_time = m.start_time==0?'':new Date(m.start_time*1000);
|
|
|
- v.end_time = m.end_time==0?'':new Date(m.end_time*1000);
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- let arr;
|
|
|
- resp.data.plan.forEach(v=>{
|
|
|
- if(v.basic_procedure_id==-1){
|
|
|
- arr =v;
|
|
|
- }
|
|
|
- })
|
|
|
- if(arr){
|
|
|
- arr.start_time = arr.start_time==0?'':new Date(arr.start_time*1000);
|
|
|
- arr.end_time = arr.end_time==0?'':new Date(arr.end_time*1000);
|
|
|
- this.plan_weight_data = arr
|
|
|
- }
|
|
|
- this.showModal=true
|
|
|
- })
|
|
|
+ // getPlanData(){
|
|
|
+ // // if(this.selectData.length==0){
|
|
|
+ // // return this.$Message.warning('请先选择图号!')
|
|
|
+ // // }
|
|
|
+ // this.axios.get('/api/basics_procedure_index').then(res=>{
|
|
|
+ // this.planData = res.data.data;
|
|
|
+ // this.planData.forEach(v=>{
|
|
|
+ // v.basic_procedure_id = v.id
|
|
|
+ // v.start_time='';
|
|
|
+ // v.end_time='';
|
|
|
+ // })
|
|
|
+ // this.axios.get('/api/bst_order_pic_number_list',{params:{order_no:this.$route.query.order_no,page_size:1,page_index:1}}).then(resp=>{
|
|
|
+ // this.planData.forEach(v=>{
|
|
|
+ // resp.data.plan.forEach(m=>{
|
|
|
+ // if(v.basic_procedure_id==m.basic_procedure_id){
|
|
|
+ // v.start_time = m.start_time==0?'':new Date(m.start_time*1000);
|
|
|
+ // v.end_time = m.end_time==0?'':new Date(m.end_time*1000);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // let arr;
|
|
|
+ // resp.data.plan.forEach(v=>{
|
|
|
+ // if(v.basic_procedure_id==-1){
|
|
|
+ // arr =v;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // if(arr){
|
|
|
+ // arr.start_time = arr.start_time==0?'':new Date(arr.start_time*1000);
|
|
|
+ // arr.end_time = arr.end_time==0?'':new Date(arr.end_time*1000);
|
|
|
+ // this.plan_weight_data = arr
|
|
|
+ // }
|
|
|
+ // this.showModal=true
|
|
|
+ // })
|
|
|
|
|
|
- })
|
|
|
- },
|
|
|
- postPlanData(){
|
|
|
- let time = JSON.parse(JSON.stringify(this.planData));
|
|
|
- let weight_time = JSON.parse(JSON.stringify(this.plan_weight_data));
|
|
|
- time.forEach(v=>{
|
|
|
- v.start_time = v.start_time?Date.parse(v.start_time).toString().slice(0,10):'';
|
|
|
- v.end_time = v.end_time?Date.parse(v.end_time).toString().slice(0,10):'';
|
|
|
- })
|
|
|
- weight_time.start_time = weight_time.start_time?Date.parse(weight_time.start_time).toString().slice(0,10):'';
|
|
|
- weight_time.end_time = weight_time.end_time?Date.parse(weight_time.end_time).toString().slice(0,10):'';
|
|
|
- weight_time.basic_procedure_id = -1;
|
|
|
- weight_time.type=-1;
|
|
|
- time.push(weight_time);
|
|
|
- let obj = {};
|
|
|
- obj.order_no = this.$route.query.order_no;
|
|
|
- obj.procedure_list = time;
|
|
|
- // obj.pic_number = [];
|
|
|
- // this.selectData.forEach(v=>{
|
|
|
- // obj.pic_number.push(v.id)
|
|
|
- // })
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // postPlanData(){
|
|
|
+ // let time = JSON.parse(JSON.stringify(this.planData));
|
|
|
+ // let weight_time = JSON.parse(JSON.stringify(this.plan_weight_data));
|
|
|
+ // time.forEach(v=>{
|
|
|
+ // v.start_time = v.start_time?Date.parse(v.start_time).toString().slice(0,10):'';
|
|
|
+ // v.end_time = v.end_time?Date.parse(v.end_time).toString().slice(0,10):'';
|
|
|
+ // })
|
|
|
+ // weight_time.start_time = weight_time.start_time?Date.parse(weight_time.start_time).toString().slice(0,10):'';
|
|
|
+ // weight_time.end_time = weight_time.end_time?Date.parse(weight_time.end_time).toString().slice(0,10):'';
|
|
|
+ // weight_time.basic_procedure_id = -1;
|
|
|
+ // weight_time.type=-1;
|
|
|
+ // time.push(weight_time);
|
|
|
+ // let obj = {};
|
|
|
+ // obj.order_no = this.$route.query.order_no;
|
|
|
+ // obj.procedure_list = time;
|
|
|
+ // // obj.pic_number = [];
|
|
|
+ // // this.selectData.forEach(v=>{
|
|
|
+ // // obj.pic_number.push(v.id)
|
|
|
+ // // })
|
|
|
|
|
|
|
|
|
- this.axios.post('/api/bst_order_pic_number_detail_edit',obj).then(res=>{
|
|
|
- if(res.code==200){
|
|
|
- this.initData();
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ // this.axios.post('/api/bst_order_pic_number_detail_edit',obj).then(res=>{
|
|
|
+ // if(res.code==200){
|
|
|
+ // this.initData();
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
tableSelect(e){
|
|
|
this.selectData = e;
|
|
|
},
|
|
|
postData(){
|
|
|
- this.axios.post('/api/bst_order_pic_number_price_edit',{order_no:this.$route.query.order_no,procedure_list:[...this.tableData]}).then(res=>{
|
|
|
+ this.axios.post('/api/bst_order_pic_number_price_edit',{another_title:this.another_title,order_no:this.$route.query.order_no,procedure_list:[...this.tableData]}).then(res=>{
|
|
|
if(res.code == 200){
|
|
|
this.initData();
|
|
|
}
|
|
|
@@ -215,6 +237,7 @@ export default {
|
|
|
this.tableData = res.data.data;
|
|
|
this.total_contract_price = (res.data.total_contract_price*1).toFixed(2);
|
|
|
this.total_quantity_price = (res.data.total_quantity_price*1).toFixed(2);
|
|
|
+ this.another_title = res.data.another_title||'';
|
|
|
this.total = res.data.total;
|
|
|
})
|
|
|
},
|
|
|
@@ -226,6 +249,7 @@ export default {
|
|
|
},
|
|
|
searchURL(row){
|
|
|
let obj = {};
|
|
|
+ obj.another_title = this.another_title;
|
|
|
obj.order_no = this.$route.query.order_no;
|
|
|
obj.pic_number = {
|
|
|
start_pic_number :row.start_number?row.start_number:'',
|