Forráskód Böngészése

Merge branch 'hw' of http://121.41.102.225:8099/Nidong/jiufang

Andy 4 éve
szülő
commit
cc31d38be3

+ 11 - 0
sh.exe.stackdump

@@ -0,0 +1,11 @@
+Stack trace:
+Frame        Function    Args
+000FFFFB540  00180064365 (00180275F10, 00180266FD1, 000FFFFCA60, 000FFFFBA20)
+000FFFFBA70  001800499D2 (00100002000, 0018034EB80, 00000000001, 00000000110)
+000FFFFCA80  00180049A11 (00000000001, 0018034EE90, 000FFFFCA60, 00000000008)
+000FFFFCB10  0018005CFCD (00000000000, 000FFFFCC40, 001800DC3EF, 00000000000)
+000FFFFCBF0  0018005D12B (000FFFFCDF0, 00000000000, FFFFFFFFFFFFFFD7, 00000000000)
+000FFFFCCE0  0018004A1A8 (00000000000, 00000000000, 00000000000, 00000000000)
+000FFFFCDA0  00180048A2A (00000000000, 00000000000, 00000000000, 00000000000)
+000FFFFCE50  00180048AEC (00000000000, 00000000000, 00000000000, 00000000000)
+End of stack trace

+ 1 - 1
src/components/currencyPage/index.vue

@@ -226,6 +226,6 @@ export default {
   overflow-y: auto;
   position: relative;
   top: 0px;
-  height: 80%;
+  height: 670px;
 }
 </style>

+ 8 - 0
src/routerMap/index.js

@@ -1393,6 +1393,14 @@ const routerMap = [
     component: (resolve) => require(["@/views/BasicSettings/Setting"], resolve),
   },
   {
+    path: "/cms/BasicSettings/copy_Setting",
+    name: "CopySetting", //设置
+    meta: {
+      index: 3,
+    },
+    component: (resolve) => require(["@/views/BasicSettings/copy_Setting"], resolve),
+  },
+  {
     path: "/cms/BasicSettings/CustomerFiles/CustomerClassify",
     name: "CustomerClassify", //客户分类
     meta: {

+ 8 - 0
src/views/BasicSettings/OverStandardPrice/detail.vue

@@ -6,6 +6,8 @@
           ? '超标价格方案新增'
           : type == 2
           ? '超标价格方案编辑'
+          : type == 5
+          ? '超标价格方案复制'
           : '超标价格方案详情'
       "
     >
@@ -283,6 +285,9 @@ export default {
           .then((res) => {
             this.tableData = res.data.list;
             this.formData = res.data.detail;
+            if(this.type == 5){
+              this.formData.id = null;
+            }
             if (this.type != 3) {
               this.tableData.forEach((element, index) => {
                 element.partsList = [];
@@ -335,6 +340,9 @@ export default {
       }
     },
     postData() {
+      if(this.type == 5){
+       delete this.formData.id
+      }
       this.axios({
         method: "post",
         url: "/api/overdraft_edit",

+ 4 - 1
src/views/BasicSettings/OverStandardPrice/list.vue

@@ -20,6 +20,8 @@
       <template slot='set'
                 slot-scope='{row,index}'>    
         <div class="table-set">
+            <a style="margin:0 5px"
+             @click="handleSet(row,index,5)">复制</a>
           <a style="margin:0 5px"
              @click="handleSet(row,index,2)">编辑</a>
           <a style="margin:0 5px"
@@ -101,10 +103,11 @@ export default {
       this.init(this.proxyObj)
     },
     handleSet (row, index, type) {
-      // 1新增 2编辑 3查看 4删除
+      // 1新增 2编辑 3查看 4删除 5复制
       switch (type) {
         case 1:
         case 2:
+        case 5:
         case 3:
           this.$router.push({
             path: '/cms/BasicSettings/OverStandardPrice/detail',

+ 365 - 0
src/views/BasicSettings/copy_Setting.vue

@@ -0,0 +1,365 @@
+<template>
+<div style="overflow-y:auto;overflow-x:hidden;height:92%;width:100%;margin-top:10px">
+      <Toptitle title="项目设置">
+      </Toptitle>
+     <div style="padding: 10px" class="setting" >
+         <Card :padding="0" v-for="(item,index) in content" :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="card_content">
+            <div :title="_item.title" v-for="(_item,_index) in item.content" :key="_index" >
+          <!-- 开关 -->
+           
+                <div v-if="_item.sub_state == 2" style="display:flex;justify-content: space-between;margin:15px 0;">
+                  <label>{{_item.title}}</label>  <i-switch :value="_item.value==1?true:false" slot="extra"  @on-change="change($event,_index,item)" style="margin-right:30px" />
+                </div>
+
+
+
+            <!-- 输入框 -->
+                <!-- <div  v-for="(_item,_index) in item.content" :key="_index" style="position: relative;top:-40px;display:flex;margin-top:20px"> -->
+                    <div  v-if="_item.sub_state == 1" style="margin:10px 0">
+                   <label >{{_item.title}}:</label> <Input v-model="_item.value" style="width:250px;margin-left:20px"/>
+               </div>
+
+
+
+
+          <!-- 图片 -->
+              <div class="product-add" v-if="_item.sub_state == 3">
+                  <label>{{_item.title}}:</label>
+                <div
+                  class="items"
+                  v-if="_item.value"
+                >
+                  <img
+                    @click="looks(_item.value)"
+                    :src="$store.state.ip + _item.value"
+                    alt=""
+                  />
+                  <Icon
+                    size="20"
+                    @click="delItems(_item)"
+                    class="delete-img"
+                    type="ios-close-circle"
+                  />
+                </div>
+
+                <div class="add-items" v-show="!_item.value">
+                  <div class="_item">
+                    <Icon size="50" type="ios-add" />
+                  </div>
+                  <input
+                    @change="changeIpt($event,_index,index)"
+                    type="file"
+                    class="ipt"
+                  />
+                </div>
+              </div>
+            </div>
+          </div>
+            <Tooltip max-width="200" :content="item.remark" 
+            style="min-width:200px;position:absolute;right:-168px;bottom:9px;cursor: pointer">
+           <Icon type="md-help-circle" size="24" />
+            </Tooltip>
+        </Card>
+        <!-- <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 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="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="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-if="item.content"
+                >
+                  <img
+                    @click="looks(item.content)"
+                    :src="$store.state.ip + item.content"
+                    alt=""
+                  />
+                  <Icon
+                    size="20"
+                    @click="delItems(item)"
+                    class="delete-img"
+                    type="ios-close-circle"
+                  />
+                </div>
+
+                <div class="add-items" v-show="!item.content">
+                  <div class="_item">
+                    <Icon size="50" type="ios-add" />
+                  </div>
+                  <input
+                    @change="changeIpt($event,index)"
+                    type="file"
+                    class="ipt"
+                  />
+                </div>
+              </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>
+        </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>
+        </Card> -->
+    </div>
+</div>
+</template>
+<script>
+export default {
+    data(){
+        return {
+                switchValue: true,
+                switch1:true,
+                tempItem:{
+                    url:[],
+                },
+                logo_title:'',
+                content:[],
+                logo_title:{},
+                tempItem_op:{},
+                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 =>{//sub_type 1 文本 2 开关 3 图片
+             item.title_type = false;
+                  if(item.sub_type == 2){
+                    this.switch_list.push(item);
+                    this.switch_list.forEach(item=>{
+                     
+                    })
+                  }
+                  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(',')
+                    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_title(item,type){
+          item.title_type = !item.title_type;
+          this.$forceUpdate();
+          if(type){
+            this.upload(item)
+          }
+      },
+        change(e,_index,item){
+            item.content[_index].value = e?1:0;
+             this.axios.post('/api/basics_config_edit',item).then(res=>{
+                 console.log(res)
+             })
+        },
+        upload(item){
+            this.axios.post('/api/basics_config_edit',item).then(res=>{
+                if(res.code == 200){
+                     this.$Message.success(res.msg)
+                }
+               
+            })
+        },
+        looks(img) {
+      const array = [{ img_url: img }];
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+    delItems(item) {
+      item.value = null;
+    },
+    changeIpt(e,_index,index) {
+      let file = e.target.files[0];
+      
+      this.postImg(file,_index,index);
+      e.target.value = null;
+    },
+    postImg(file, _index,index) {
+        
+      let formData = new FormData();
+      formData.append("file", file);
+      this.axios.post("/api/upload_pic", formData).then((res) => {
+        this.$nextTick(() => {
+         this.content[index].content[_index].value= res.data.url;
+   
+    
+          // this.$forceUpdate();
+        });
+      });
+    },
+    }
+       
+        }
+</script>
+<style scoped lang='scss'>
+.setting{
+   margin-top:10px ;
+  display: flex;
+  flex-wrap: wrap;
+  align-items: flex-start;
+}
+.product-add {
+    margin: 10px 0;
+//   position: relative;
+//   top: 0
+//   height: 140px;
+  .ipt {
+    position: absolute;
+    width: 50px;
+    height: 50px;
+    opacity: 0;
+    cursor: pointer;
+    outline: none;
+    // top: 0;
+    // left: 0;
+  }
+  .add-items {
+      position: relative;
+      left: 25px;
+      top: 20px;
+    //   transform: translate(-50%,-50%);
+    width: 40px;
+    height: 40px;
+    border: 1px dotted #e7e7e7;
+    border-radius: 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    overflow: hidden;
+    background: #f4f5f7;
+    .item {
+      width: 46px;
+      height: 46px;
+      background: #3764ff;
+      opacity: 0.6;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      border-radius: 50%;
+      color: #fff;
+    }
+  }
+  .items {
+    width: 100px;
+    height: 100px;
+    // margin-bottom: 10px;
+    // display: flex;
+    // justify-content: center;
+    // align-items: center;
+    // margin-right: 10px;
+    border-radius: 5px;
+    // position: relative;
+    // left:50%;
+    // top: 40%;
+    // transform: translate(-50%,-50%);
+    img {
+      max-width: 100px;
+      max-height: 100px;
+    }
+  }
+}
+/deep/ .ivu-card{
+        
+         background:  #f8f8f9;
+         width: 365px;
+        //  height: auto;
+         margin: 10px;
+         border-radius: 20px;
+         position: relative;
+  .ivu-card:hover{
+      box-shadow: darkgrey 2px 2px 2px 2px ;//边框阴影
+  }
+}
+ /deep/ .ivu-card-head{
+    border-bottom: none;
+    height: auto;
+    p{
+         font-weight: 800;
+    }
+   
+}
+/deep/ .ivu-card-body{
+    display: flex;
+    flex-direction: column;
+}
+.delete-img{
+    position: relative;
+    top:-105px;
+    left: 90px;
+}
+.upload_pic{
+    position: relative;
+    top: -44px;
+    right: -310px;
+    color: red;
+}
+.upload_text{
+   position: relative;
+    top: -60px;
+    right: -444px;
+    color: red;
+}
+.card_content{
+
+    position:relative;
+    top: -30px;
+    left: 10px;
+    display: flex;
+    flex-direction: column;
+}
+// /deep/ .ivu-cell-group{
+//   position: relative;
+//   top: -10px;
+// }
+</style>

+ 98 - 2
src/views/ProductMannage/index.vue

@@ -40,7 +40,7 @@
         <Button
           type="primary"
           ghost
-          @click="showModal = true"
+          @click="replaceItem"
           style="margin-right:10px;"
           >批改替换项</Button
         >
@@ -144,13 +144,19 @@
               <Button type="primary" ghost style="border-radius:10px"
                 >无</Button
               >
+               <Button type="primary" ghost style="border-radius:10px;margin-left:20px" @click="add" 
+                ><Icon type="md-add" :size='20'/></Button
+              >
             </div>
-            <div v-else class="show_modal_content_left_item_detail_warp">
+            <div v-else class="show_modal_content_left_item_detail_warp" >
               <div
                 class="show_modal_content_left_item_detail"
                 v-for="part in productPartList"
                 :key="part.id"
+                id="content_left_item"
               >
+              <svg t="1638267575516" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3395" width="200" height="200" style="position: relative;left: 6px;top: -10px;" @click="edit(part)"><path d="M1005.037624 158.992107 899.701554 264.044722 759.214916 123.967406 864.587825 18.915815c19.389606-19.335371 50.835805-19.335371 70.225411 0l70.224388 70.047356C1024.42723 108.297518 1024.42723 139.656737 1005.037624 158.992107zM267.31879 614.19145l140.484591 140.091642-187.231265 46.62183L267.31879 614.19145zM864.587825 299.04998l-421.387259 420.210457L302.75179 579.203588l421.352467-420.211481L864.587825 299.04998zM113.70518 181.723831l0 728.575594 728.57764 0L842.28282 363.868241l109.289102-72.858378 0 692.146916c0 27.535123-8.895601 36.429701-36.432771 36.429701L54.296115 1019.58648c-27.535123 0-49.875944-22.305005-49.875944-49.841152L4.420171 108.866477c0-27.535123 8.858762-36.429701 36.428677-36.429701l692.14794 0L623.709733 181.723831 113.70518 181.723831z" p-id="3396" fill="#707070"></path></svg>
+              <!-- <Icon type="md-create" style="position: relative;left: 10px;top: -8px;" color='black' :size='10'/> -->
                 <Button
                   type="primary"
                   :ghost="!part.isSelect"
@@ -158,7 +164,12 @@
                   @click="handlePartClick(part, 3)"
                   >{{ part.title }}</Button
                 >
+              <svg t="1638267935515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5634" width="200" height="200" style="position: relative;left: -8px;top: -10px;" @click="del"><path d="M585.412525 512.594747L973.601616 124.418586c19.600808-19.600808 19.600808-51.898182 0-71.49899l-2.120404-2.120404c-19.600808-19.600808-51.898182-19.600808-71.49899 0L511.793131 439.518384 123.61697 50.799192c-19.600808-19.600808-51.898182-19.600808-71.49899 0l-2.120404 2.120404c-20.11798 19.600808-20.11798 51.898182 0 71.49899l388.189091 388.189091L49.997576 900.783838c-19.587879 19.600808-19.587879 51.898182 0 71.49899l2.120404 2.120404c19.600808 19.600808 51.898182 19.600808 71.49899 0L511.793131 586.214141l388.189091 388.176162c19.600808 19.600808 51.898182 19.600808 71.49899 0l2.120404-2.120404c19.600808-19.600808 19.600808-51.898182 0-71.49899L585.412525 512.594747z m0 0" p-id="5635" fill="#707070"></path></svg>
+                <!-- <Icon type="md-close" style="position: relative;left: -10px;top: -8px;" color='black' :size='20'/> -->
               </div>
+               <Button type="primary" ghost style="border-radius:10px;margin-left:10px" @click="add" 
+                ><Icon type="md-add" :size='20'/></Button
+              >
             </div>
           </div>
         </div>
@@ -224,6 +235,68 @@
       </div>
       <div slot="footer"></div>
     </Modal>
+
+     <Modal
+      v-model="edit_showModel"
+      title="批量修改部件"
+      width="400"
+     :draggable='true'
+    >
+    <Form :model='formData' >
+      <FormItem >
+        <span>默认部件:</span>
+       <Select v-model="formData.edit_part" style="width:140px">
+     <Option v-for="item in productPartList" :key="item.id" :value="item.id">
+     {{item.title}}
+     </Option>
+       </Select>
+      </FormItem>
+      <FormItem >
+         <span>高:</span><Input type="number" style='width:60px;margin-right:20px' v-model="defaultPart.formula_l"/>
+         <span>宽:</span><Input type="number" style='width:60px;margin-right:20px' v-model="defaultPart.formula_w"/>
+         <span>厚:</span><Input type="number" style='width:60px' v-model="defaultPart.formula_h"/>
+      </FormItem>
+      <FormItem>
+        <span>是否为空: <vxe-switch v-model="defaultPart.is_null"></vxe-switch> </span>
+      </FormItem>
+    </Form>
+    </Modal>
+
+    <Modal  title="批量修改部件"
+      width="400"
+      v-model="del_showModel"
+      
+      >
+      <div style="text-align:center">是否确定删除该部件?</div>
+      
+    </Modal>
+
+     <Modal
+      v-model="add_showModel"
+      title="批量增加部件"
+      width="400"
+     :draggable='true'
+    >
+    <Form :model='formData' >
+      <FormItem >
+        <span>默认部件:</span>
+       <Select v-model="formData.edit_part" style="width:140px">
+     <Option v-for="item in productPartList" :key="item.id" :value="item.id">
+     {{item.title}}
+     </Option>
+       </Select>
+      </FormItem>
+      <FormItem >
+         <span>高:</span><Input type="number" style='width:60px;margin-right:20px' v-model="defaultPart.formula_l"/>
+         <span>宽:</span><Input type="number" style='width:60px;margin-right:20px' v-model="defaultPart.formula_w"/>
+         <span>厚:</span><Input type="number" style='width:60px' v-model="defaultPart.formula_h"/>
+      </FormItem>
+      <FormItem>
+        <span>是否为空: <vxe-switch v-model="defaultPart.is_null"></vxe-switch> </span>
+      </FormItem>
+    </Form>
+    </Modal>
+
   </div>
 </template>
 
@@ -234,6 +307,12 @@ export default {
   components: { KeyBoard },
   data() {
     return {
+      add_showModel:false,
+      edit_showModel:false,
+      del_showModel:false,
+      formData:{
+        edit_part:null,
+      },
       list: [
         {
           title: "产品名称",
@@ -563,6 +642,15 @@ export default {
     },
   },
   methods: {
+    replaceItem(){
+       this.showModal = true;
+    },
+    add(){
+    this.add_showModel = true;
+    },
+    del(){
+     this.del_showModel = true;
+    },
     init(row) {
       this.pageIndex = 1;
       row.page_index = this.pageIndex;
@@ -731,6 +819,14 @@ export default {
       // this.proxyObj.sortList = sortList;
       this.getData(this.proxyObj);
     },
+    edit(val){
+      this.productPartList.forEach(v=>{
+        v.isSelect = false;
+      })
+      val.isSelect = !val.isSelect
+      console.log(val)
+      this.edit_showModel = true;
+    },
     goPage(n, row) {
       //n = 1 新增 2 编辑 3 查看
       let id = row ? row.id : "";

+ 1 - 1
vue.config.js

@@ -2,7 +2,7 @@ const axios_default_ip =
   process.env.NODE_ENV == "dev"
     ? "http://124.71.176.88:882"
     : process.env.NODE_ENV == "test-prd"
-    ? "http://124.71.176.88:882" //测试服
+    ? "http://121.41.102.225:82" //测试服
     : process.env.NODE_ENV == "prd_other"
     ? "http://121.37.173.82:82" //贝斯特
     : "http://124.71.176.88:82";