|
@@ -2,6 +2,22 @@
|
|
<div>
|
|
<div>
|
|
<Toptitle :title="types==0?'详情':'编辑'">
|
|
<Toptitle :title="types==0?'详情':'编辑'">
|
|
<Button @click="$router.go(-1)">返回</Button>
|
|
<Button @click="$router.go(-1)">返回</Button>
|
|
|
|
+ <Upload
|
|
|
|
+ :disabled='selectData.length==0'
|
|
|
|
+ style="display: inline"
|
|
|
|
+ name="your_file"
|
|
|
|
+ :show-upload-list="false"
|
|
|
|
+ accept='image'
|
|
|
|
+ :headers="headers"
|
|
|
|
+ :data='{order_no:$route.query.order_no,url_number:selectUrl}'
|
|
|
|
+ :on-error="uploadError"
|
|
|
|
+ :on-success="uploadSuccess"
|
|
|
|
+ :action="$store.state.ip + '/api/deep_img_imports'"
|
|
|
|
+ >
|
|
|
|
+ <Button type="primary" style="margin-left: 10px" @click="()=>(selectData.length==0&&$Message.warning('请选择数据!'))"
|
|
|
|
+ >导入图纸</Button
|
|
|
|
+ >
|
|
|
|
+ </Upload>
|
|
</Toptitle>
|
|
</Toptitle>
|
|
<Form :label-width='120' class="form_content">
|
|
<Form :label-width='120' class="form_content">
|
|
<FormItem label='下单编号:' class="form_item">
|
|
<FormItem label='下单编号:' class="form_item">
|
|
@@ -65,6 +81,9 @@
|
|
<template slot="set" slot-scope="{row}">
|
|
<template slot="set" slot-scope="{row}">
|
|
<a @click="handleDel(row)">删除</a>
|
|
<a @click="handleDel(row)">删除</a>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template slot="img_url" slot-scope="{row}">
|
|
|
|
+ <img @click="looks(row.img_url)" :src="$store.state.ip + row.img_url" alt="" class="img_content"/>
|
|
|
|
+ </template>
|
|
</Table>
|
|
</Table>
|
|
<div class="footerPage">
|
|
<div class="footerPage">
|
|
<Page
|
|
<Page
|
|
@@ -86,6 +105,8 @@
|
|
export default {
|
|
export default {
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
|
|
+ selectUrl:[],
|
|
|
|
+ headers: { Authorization: localStorage.getItem("token") },
|
|
selectData:[],
|
|
selectData:[],
|
|
change_type:false,
|
|
change_type:false,
|
|
types:'',
|
|
types:'',
|
|
@@ -121,7 +142,7 @@ export default {
|
|
// {title:'规格',align:'center',key:'measure',minWidth:120},
|
|
// {title:'规格',align:'center',key:'measure',minWidth:120},
|
|
{title:'饰面',align:'center',key:'process_property',minWidth:120},
|
|
{title:'饰面',align:'center',key:'process_property',minWidth:120},
|
|
{title:'数量',align:'center',key:'num',minWidth:120},
|
|
{title:'数量',align:'center',key:'num',minWidth:120},
|
|
- {title:'图纸',align:'center',key:'img_url',minWidth:120},
|
|
|
|
|
|
+ {title:'图纸',align:'center',key:'img_url',minWidth:120,slot:'img_url'},
|
|
],
|
|
],
|
|
tableColumns:[],
|
|
tableColumns:[],
|
|
totalTableColumns:[],
|
|
totalTableColumns:[],
|
|
@@ -138,7 +159,7 @@ export default {
|
|
return h('span',{},row.fashion==1?'左':row.fashion==2?'右':'')
|
|
return h('span',{},row.fashion==1?'左':row.fashion==2?'右':'')
|
|
}},
|
|
}},
|
|
{title:'图号',align:'center',key:'url_number',minWidth:120},
|
|
{title:'图号',align:'center',key:'url_number',minWidth:120},
|
|
- {title:'图纸',align:'center',key:'img_url',minWidth:120},
|
|
|
|
|
|
+ {title:'图纸',align:'center',key:'img_url',minWidth:120,slot:'img_url'},
|
|
{title:'饰面',align:'center',key:'process_property',minWidth:120},
|
|
{title:'饰面',align:'center',key:'process_property',minWidth:120},
|
|
{title:'规格',align:'center',key:'measure',minWidth:120},
|
|
{title:'规格',align:'center',key:'measure',minWidth:120},
|
|
{title:'数量',align:'center',key:'num',minWidth:120},
|
|
{title:'数量',align:'center',key:'num',minWidth:120},
|
|
@@ -155,9 +176,34 @@ export default {
|
|
this.initData();
|
|
this.initData();
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ looks(img) {
|
|
|
|
+ const array = [{ img_url: img }];
|
|
|
|
+ this.$previewImg({
|
|
|
|
+ list: array,
|
|
|
|
+ baseUrl: this.$store.state.ip,
|
|
|
|
+ baseImgField: "img_url",
|
|
|
|
+ baseTitleField: "",
|
|
|
|
+ showPrint:true
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ uploadError(err) {
|
|
|
|
+ this.$Message.error(err.msg || "上传失败");
|
|
|
|
+ },
|
|
|
|
+ //导入成功
|
|
|
|
+ uploadSuccess(res) {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$Message.success(res.msg || "上传成功");
|
|
|
|
+ } else {
|
|
|
|
+ this.$Message.warning(res.msg || "上传失败");
|
|
|
|
+ }
|
|
|
|
+ },
|
|
handleSelect(e){
|
|
handleSelect(e){
|
|
console.log(e);
|
|
console.log(e);
|
|
this.selectData = e;
|
|
this.selectData = e;
|
|
|
|
+ this.selectUrl = [];
|
|
|
|
+ e.forEach(v=>{
|
|
|
|
+ this.selectUrl.push(v.url_number)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
handleTabsDel(){
|
|
handleTabsDel(){
|
|
if(this.selectData.length==0){
|
|
if(this.selectData.length==0){
|
|
@@ -229,10 +275,11 @@ export default {
|
|
// const {row} = params;
|
|
// const {row} = params;
|
|
// return h('span',{},row.split_state==0?'未下拆单':'已下拆单')
|
|
// return h('span',{},row.split_state==0?'未下拆单':'已下拆单')
|
|
// }}]
|
|
// }}]
|
|
- this.tableColumns = [...this.reTableColumns];
|
|
|
|
|
|
+ this.tableColumns = [{type:'selection',align:'center',minWidth:80},...this.reTableColumns];
|
|
}else{
|
|
}else{
|
|
- this.tableColumns = this.reTableColumns;
|
|
|
|
|
|
+ this.tableColumns = this.reTableColumns;
|
|
}
|
|
}
|
|
|
|
+
|
|
this.total = res.data.total;
|
|
this.total = res.data.total;
|
|
this.houseList=res.data.house;
|
|
this.houseList=res.data.house;
|
|
this.unitList=res.data.unit;
|
|
this.unitList=res.data.unit;
|
|
@@ -308,4 +355,8 @@ export default {
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
+.img_content{
|
|
|
|
+ width:18px;
|
|
|
|
+ height: 18px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|