mushencc пре 3 година
родитељ
комит
9921f9f51e

+ 87 - 50
src/views/BasicSettings/Setting.vue

@@ -3,50 +3,67 @@
       <Toptitle title="项目设置">
       </Toptitle>
      <div style="padding: 10px" class="setting" >
-        <Card :title="examine_title" :padding="0" >
+        <Card :padding="0" v-for="(item,index) in switch_list" :key="index">
+          
+          <Input slot="title" v-if="item.title_type" @on-blur="change_title(item,1)" v-model="item.title" autofocus='true' style="width:90%"></Input>
+          <p slot="title" v-else @click="change_title(item)">{{item.title}}</p>
             <CellGroup>
-                <Cell :title="item.title" v-for="(item,index) in cell_title" :key="index">
-                    <i-switch v-model="item.state" slot="extra"  @on-change="change($event,index)" />
+                <Cell :title="_item.title" v-for="(_item,_index) in item.content" :key="_index">
+                    <i-switch v-model="_item.state" slot="extra"  @on-change="change($event,_index,item)" />
                 </Cell>
             </CellGroup>
-            <Tooltip max-width="200" :content="examine_remark" 
+            <Tooltip max-width="200" :content="item.remark" 
             style="min-width:200px;position:absolute;right:-168px;top:169px;cursor: pointer">
            <Icon type="md-help-circle" size="24" />
             </Tooltip>
         </Card>
-      <Card :title="logo_title"  :padding="0"   >
-              <a @click="upload" class="upload_pic">上传</a>
+      <Card :title="item.title"  :padding="0" v-for="(item,index) in logo_list" :key="index" >
+         <Input slot="title" v-if="item.title_type" @on-blur="change_title(item,1)" v-model="item.title" autofocus='true' style="width:80%"></Input>
+          <p slot="title" v-else @click="change_title(item)">{{item.title}}</p>
+              <a @click="upload(item)" class="upload_pic">上传</a>
               <div class="product-add">
                 <div
                   class="items"
-                  v-for="(_item, _index) of tempItem.url"
-                  :key="_index"
+                  v-if="item.content"
                 >
                   <img
-                    @click="looks(_item)"
-                    :src="$store.state.ip + _item"
+                    @click="looks(item.content)"
+                    :src="$store.state.ip + item.content"
                     alt=""
                   />
                   <Icon
                     size="20"
-                    @click="delItems(_index, tempItem.url)"
+                    @click="delItems(item)"
                     class="delete-img"
                     type="ios-close-circle"
                   />
                 </div>
 
-                <div class="add-items" v-show="this.tempItem.url.length == 0">
+                <div class="add-items" v-show="!item.content">
                   <div class="_item">
                     <Icon size="50" type="ios-add" />
                   </div>
                   <input
-                    @change="changeIpt($event, tempItem.url)"
+                    @change="changeIpt($event,index)"
                     type="file"
                     class="ipt"
                   />
                 </div>
               </div>
-                 <Tooltip max-width="200" :content="logo_remark" 
+                 <Tooltip max-width="200" :content="item.remark" 
+            style="min-width:200px;position:absolute;right:-168px;top:169px;cursor: pointer">
+           <Icon type="md-help-circle" size="24" />
+            </Tooltip>
+        </Card>
+        <Card v-for="(item,index) in text_list" :key="index" :title="item.title" style="width:520px">
+          <Input slot="title" v-if="item.title_type" @on-blur="change_title(item,1)" v-model="item.title" autofocus='true' style="width:80%"></Input>
+          <p slot="title" v-else @click="change_title(item)">{{item.title}}</p>
+           <a @click="upload(item)" class="upload_text">保存</a>
+          
+                <div  v-for="(_item,_index) in item.content" :key="_index" style="position: relative;top:-40px;display:flex;margin-top:20px">
+                   <label style="width:80px;margin-right:60px">{{_item.title}}:</label> <Input v-model="_item.value" />
+                </div>
+           <Tooltip max-width="200" :content="item.remark" 
             style="min-width:200px;position:absolute;right:-168px;top:169px;cursor: pointer">
            <Icon type="md-help-circle" size="24" />
             </Tooltip>
@@ -65,53 +82,59 @@ export default {
                 },
                 logo_title:'',
                 content:[],
-                examine_title:{},
                 logo_title:{},
-                cell_title:{},
                 tempItem_op:{},
-                examine_data:{},
-                examine_remark:'',
-                logo_remark:''
+                logo_remark:'',
+                switch_list:[],
+                logo_list:[],
+                text_list:[],
             }
     },
    mounted(){
         this.axios.get('/api/basics_config_list').then(res=>{
             this.content = res.data;
-            this.content.forEach(item =>{
+            this.content.forEach(item =>{//sub_type 1 文本 2 开关 3 图片
                   if(item.sub_type == 2){
-                      this.examine_title = item.title
-                      this.examine_remark = item.remark
-                      this.examine_data = item
-                      this.cell_title =item.content
-                      this.cell_title.forEach(item=>{
-                          if(item.state == 0){
-                              item.state = false
-                          }else{
-                              item.state = true
-                          }
-                      })
-                      console.log(this.cell_title)
+                    this.switch_list.push(item);
+                    this.switch_list.forEach(item=>{
+                      item.title_type = false;
+                    })
                   }
                   if(item.sub_type == 3){
+                    this.logo_list.push(item);
                       this.logo_title = item.title
                       this.logo_remark = item.remark
                       this.tempItem_op = item
                       this.tempItem.url = item.content.split(',')
-                      console.log(this.tempItem.url)
+                    this.logo_list.forEach(item=>{
+                      item.title_type = false;
+                    })
+                  }
+                  if(item.sub_type == 1){
+                    this.text_list.push(item);
+                    this.text_list.forEach(item=>{
+                      item.title_type = false;
+                    })
                   }
+                  
             })
         })
     },
     methods:{
-        change(e,index){
-             this.examine_data.content[index].state = e;
-             this.axios.post('/api/basics_config_edit',this.examine_data).then(res=>{
+      change_title(item,type){
+          item.title_type = !item.title_type;
+          this.$forceUpdate();
+          if(type){
+            this.upload(item)
+          }
+      },
+        change(e,index,item){
+             this.axios.post('/api/basics_config_edit',item).then(res=>{
                  console.log(res)
              })
         },
-        upload(){
-            this.tempItem_op.content = this.tempItem.url[0];
-            this.axios.post('/api/basics_config_edit',{...this.tempItem_op}).then(res=>{
+        upload(item){
+            this.axios.post('/api/basics_config_edit',item).then(res=>{
                 if(res.code == 200){
                      this.$Message.success(res.msg)
                 }
@@ -127,21 +150,24 @@ export default {
         baseTitleField: "",
       });
     },
-    delItems(n, arr) {
-      arr.splice(n, 1);
+    delItems(item) {
+      item.content = null;
     },
-    changeIpt(e, row) {
+    changeIpt(e,index) {
       let file = e.target.files[0];
-      this.postImg(file, row);
-      e.target.value = null;
+      
+      this.postImg(file,index);
+      // e.target.value = null;
     },
-    postImg(file, row) {
+    postImg(file, index) {
       let formData = new FormData();
       formData.append("file", file);
       this.axios.post("/api/upload_pic", formData).then((res) => {
         this.$nextTick(() => {
-          row.push(res.data.url);
-          this.$forceUpdate();
+         this.logo_list[index].content= res.data.url;
+   
+    
+          // this.$forceUpdate();
         });
       });
     },
@@ -157,7 +183,7 @@ export default {
 }
 .product-add {
   position: relative;
-  top: -20px;
+  top: -25px;
   height: 140px;
   .ipt {
     position: absolute;
@@ -227,6 +253,7 @@ export default {
 }
  /deep/ .ivu-card-head{
     border-bottom: none;
+    height: 60px;
     p{
          font-weight: 800;
     }
@@ -241,8 +268,18 @@ export default {
 }
 .upload_pic{
     position: relative;
-    top: -38px;
-    right: -196px;
+    top: -44px;
+    right: -200px;
+    color: red;
+}
+.upload_text{
+   position: relative;
+    top: -60px;
+    right: -444px;
     color: red;
 }
+/deep/ .ivu-cell-group{
+  position: relative;
+  top: -10px;
+}
 </style>

+ 8 - 0
src/views/MaterialMannage/edit.vue

@@ -26,6 +26,13 @@
           placeholder="请输入物料名称"
         />
       </FormItem>
+      <FormItem label="物料简称" prop="title">
+        <Input
+          :disabled="type == 3 ? true : false"
+          v-model="info.abbreviation_title"
+          placeholder="请输入物料简称"
+        />
+      </FormItem>
       <FormItem label="物料分类" prop="m_id">
         <Select
           filterable
@@ -260,6 +267,7 @@ export default {
       info: {
         m_id: "",
         img_url:'',
+        abbreviation_title:'',
         detail: [
           {
             long: "",

+ 3 - 2
src/views/leadMatch/roomList/edit.vue

@@ -57,7 +57,7 @@
               <span :style="item.state == 1?'':'color:red;'">{{item.state == 0?'未匹配':item.state == 1?'匹配完成':'匹配中'}}</span>
             </div>
             <div class="table_header_right">
-              <Button type="primary" size="small" :disabled="item.state==0?false:true" @click="del(item,index)">删除</Button>
+              <Button type="primary" size="small" :disabled="item.state==0?false:true" @click="del(item,index)" v-if="$route.query.type!=2">删除</Button>
               <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>
               <span>总计{{item.total}}条数据</span>
             </div>
@@ -167,7 +167,8 @@ export default {
         ];
     },
     uploadData(){
-        return {type:this.infoNumber.length==0?this.$route.query.type:4}
+        return {type:this.infoNumber.length==0?this.$route.query.type:4,
+         project_number:this.formData.project_number}
     },
     set_tableColumns(){
         return [...this.tableColumns,

+ 3 - 2
src/views/leadMatch/weightMemo/edit.vue

@@ -59,7 +59,7 @@
                     >{{item.state == 0?'未匹配':item.state == 1?'匹配完成':'匹配中'}}</span>
             </div>
             <div class="table_header_right">
-              <Button type="primary" size="small" :disabled="item.state==0?false:true" @click="del(item,index)">删除</Button>
+              <Button type="primary" size="small" :disabled="item.state==0?false:true" @click="del(item,index)" v-if="$route.query.type!=2">删除</Button>
               <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>
               <span>总计{{item.total}}条数据</span>
             </div>
@@ -103,13 +103,14 @@ export default {
                     { title: "原材料", key: "material", align: "center", minWidth: 140 },
                       { title: "木皮2", key: "veneer_two", align: "center", minWidth: 140 },
                         { title: "毛料尺寸", key: "wollens_size", align: "center", minWidth: 140 },
+                         { title: "毛料合并的行号", key: "wool_line", align: "center", minWidth: 140 },
                           { title: "原料数量", key: "material_num", align: "center", minWidth: 140 },
                             { title: "精裁尺寸", key: "vacuum_size", align: "center", minWidth: 140 },
                               { title: "零部件数量", key: "part_num", align: "center", minWidth: 140 },
                                 { title: "贴皮面积", key: "treatment_area", align: "center", minWidth: 140 },
                                 { title: "精裁面积", key: "vacuum_area", align: "center", minWidth: 140 },
                                 { title: "工艺要求", key: "technological_requirements", align: "center", minWidth: 140 },
-                                { title: "匹配状态", key: "match_state", align: "center", minWidth: 140,slot:'state' },
+                                { title: "匹配状态", key: "state", align: "center", minWidth: 140,slot:'state' },
       ],
       headers: { Authorization: localStorage.getItem("token") },//请求头
       //进入页面需要获取的数值

+ 1 - 1
src/views/leadMatch/weightMemo/list.vue

@@ -134,7 +134,7 @@ export default {
     del(row){
       this.confirmDelete({
                 content:'是否删除?',
-                title:'房间删除',
+                title:'码单删除',
                 type:'primary',
                 then:()=>{
                        this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:1}).then(()=>{