mushencc 3 years ago
parent
commit
d085f41521

+ 18 - 0
src/routerMap/index.js

@@ -1799,6 +1799,15 @@ const routerMap = [
       require(["@/views/leadMatch/MatchList/HXYMatchPage"], resolve),
   },
   {
+    path: "/cms/leadMatch/MatchList/NewHXYMatchPage",
+    name: "HXYMatchPageNew", //匹配列表-->匹配(华信源新)
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/leadMatch/MatchList/NewHXYMatchPage"], resolve),
+  },
+  {
     path: "/cms/BasicSettings/PartSettings/list",
     name: "list", //部件配置项-列表
     meta: {
@@ -2242,6 +2251,15 @@ const routerMap = [
     component: (resolve) =>
       require(["@/views/ProductValue/detail"], resolve),
   },
+  {
+    path: "/cms/brand/list",
+    name: "brandList", //品牌列表
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/brand/list"], resolve),
+  },
   // 测试用
   {
     path: "/cms/ordermannage/businessorderlist/editcopy",

+ 152 - 1
src/views/MaterialMannage/edit.vue

@@ -165,6 +165,29 @@
           placeholder="请输入库存"
         />
       </FormItem>
+      <FormItem v-if="!isShowDetail" style="" >
+        <Button
+          type="success"
+          ghost
+          style="margin-right:10px;margin-top:35px"
+          @click="handleBrand(null,1)"
+          :disabled="type == 3 ? true : false"
+        >添加品牌</Button>
+         <Button
+         ghost
+          type="success"
+          style="margin-right:10px;margin-top:35px"
+          :disabled="type == 3 ? true : false"
+            @click="handleBrand(null,2)"
+        >编辑品牌</Button>
+          <Button
+          ghost
+          type="success"
+          style="margin-right:10px;margin-top:35px"
+            @click="handleBrand(null,3)"
+          :disabled="type == 3 ? true : false"
+        >删除品牌</Button>
+      </FormItem>
       <!-- <FormItem label="单价(元)" v-show="isShowInfoPrice" prop="price">
         <Input
           type="number"
@@ -274,6 +297,30 @@
                 @click="removeChild(info.detail, key)"
                 >删除</Button
               >
+               <Button
+                type="success"
+                ghost
+                style="margin-left:10px;"
+                :disabled="type == 3 ? true : false"
+                @click="handleBrand(info.detail,1,key)"
+                >添加品牌</Button
+              >
+               <Button
+                type="success"
+                ghost
+                style="margin-left:10px;"
+                :disabled="type == 3 ? true : false"
+                @click="addMaterrial(info.detail,2)"
+                >编辑品牌</Button
+              >
+               <Button
+                type="success"
+                ghost
+                style="margin-left:10px;"
+                :disabled="type == 3 ? true : false"
+                @click="addMaterrial(info.detail,3)"
+                >删除品牌</Button
+              >
             </div>
           </FormItem>
          
@@ -291,6 +338,36 @@
       </div>
       <div slot="footer"></div>
     </Modal>
+    <Modal title="添加品牌" width='50' v-model="showBrand" @on-ok='sureBrand'>
+      <div class="brand_content">
+          <div style="height:100%;overflow:auto">
+          <!-- <Form class="table_content" :label-width='100'>
+            <FormItem label='品牌名称:'>
+              <Input v-model='modelBrandTitle' clearable placeholder="请输入品牌名称"/>
+            </FormItem>
+            <FormItem>
+             <Button type="primary">搜索</Button>
+            </FormItem>
+          </Form> -->
+          <div class="add_btn">
+           <Button type="primary" @click="addItem">增行</Button>
+          </div>
+          <Table :data='modelTableData' :columns='modelTableColumns' border max-height='500' @on-selection-change='modelSelectData'>
+            <template slot="title" slot-scope="{index}">
+              <Select clearable v-model="modelTableData[index].brand_id" placeholder="请输入品牌名称" transfer>
+                <Option v-for="item in brandList" :key="item.id" :value="item.id" :label="item.title"/>
+              </Select>
+            </template>
+            <template slot="product_code" slot-scope="{index}">
+              <Input clearable v-model="modelTableData[index].code" placeholder="请输入物料编码"/>
+            </template>
+            <template slot="set" slot-scope="{index}">
+              <a @click="ModelDel(index)">删除</a>
+            </template>
+          </Table>
+          </div>
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -299,6 +376,18 @@ import KeyBoard from "../../components/keyboard/index";
 export default {
   data() {
     return {
+      modelIndex:'',
+      modelData:[],
+      brandList:[],
+      modelTableData:[],
+      modelTableColumns:[
+        {type:'selection',align:'center',minWidth:60},
+        {title:'品牌名称',key:'title',align:'center',minWidth:120,slot:'title'},
+        {title:'物料编码',key:'code',align:'center',minWidth:120,slot:'product_code'},
+        {title:'操作',key:'set',slot:'set',minWidth:120,align:'center'}
+      ],
+      modelBrandTitle:'',
+      showBrand:false,
       del_list:[],
       type: 1,
       info: {
@@ -355,7 +444,12 @@ export default {
     };
   },
   components: { KeyBoard },
-  created() {},
+  created() {
+    //拉取品牌列表
+    this.axios.post('/api/brand_list').then(res=>{
+          this.brandList = res.data.data;
+    })
+  },
   mounted() {
     this.type = this.$route.query.type;
     this.id = this.$route.query.id || "";
@@ -429,6 +523,45 @@ export default {
     },
   },
   methods: {
+    sureBrand(){
+         if(!this.isShowDetail){
+           this.info.detail[0].list = this.modelData;
+         }else{
+              this.info.detail[this.modelIndex].list = this.modelData;
+         }
+         console.log(this.info.detail)
+    },
+    modelSelectData(e){
+          this.modelData = e;
+    },
+    ModelDel(index){
+    this.modelTableData.splice(index,1)
+    },
+    addItem(){
+      let obj ={
+        brand_id:'',
+        code:''
+      }
+    this.modelTableData.push(obj)
+    },
+handleBrand(obj,type,key){
+ //type ==1 添加 2 编辑 3删除;
+ switch(type){
+   case 1:
+     case 2:
+       if(key){
+         this.modelIndex = key;
+         this.modelTableData = this.info.detail[key].list?this.info.detail[key].list:[];
+       }else{
+         this.modelTableData = this.info.detail[0].list?this.info.detail[0].list:[];
+       }
+       
+       this.showBrand = true;
+       break
+       case 3:
+         break;
+ }
+},
     changeSate(rows,index){
           if(!rows.is_add){
            this.info.detail[index].is_edit = true;
@@ -639,4 +772,22 @@ export default {
   top: 0px;
   color: red;
 }
+/deep/ .ivu-form-item{
+  vertical-align: top;
+}
+.brand_content{
+  height: 60vh;
+
+  .table_content{
+    margin-top:10px;
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+}
+.add_btn{
+  display: flex;
+  flex-direction: row-reverse;
+  margin-bottom:10px;
+}
 </style>

+ 64 - 1
src/views/ProductValue/detail.vue

@@ -4,6 +4,7 @@
                <Button type="primary">导出</Button>
                <Button type="primary" style="margin-left:10px" @click="back">返回</Button>
            </Toptitle>
+           <div style="height:90%;overflow:auto">
                  <Form class="form_content" :label-width='100' style="border-bottom:1px solid #eeeeee">
             <FormItem label='项目编码:'>
                <span class="form_item">{{formData.order_no}}</span>
@@ -31,6 +32,7 @@
             </FormItem>
         </Form>
            <Table :data='tableData' :columns='SetTableColumns' border max-height='550'></Table>
+           </div>
     </div>
 </template>
 <script>
@@ -49,7 +51,7 @@ export default {
            tableColumns:[
                {title:'图号',align:'center',minWidth:100,key:'url_number'},
                {title:'区域',align:'center',minWidth:100,key:'region'},
-               {title:'产品名称',align:'center',minWidth:100,key:'product_title'},
+               {title:'产品名称',align:'center',minWidth:100,key:'title'},
                {title:'数量',align:'center',minWidth:100,key:'num'},
                {title:'单价',align:'center',minWidth:100,key:'price'},
                {title:'金额',align:'center',minWidth:100,key:'total_price'},
@@ -87,7 +89,68 @@ export default {
     created(){
            this.formData = this.$route.query
     },
+    mounted(){
+     this.initData();
+    },
     methods:{
+        initData(){
+               this.axios.post('/api/output_value_statement',{order_no:this.$route.query.order_no}).then(res=>{
+                            res.data.head.forEach(ele => {
+                                ele.align = 'center'
+                                 ele.children.forEach(v=>{
+                                     v.align='center';
+                                     v.minWidth = 100;
+                                     v.ellipsis = true;
+                                     v.tooltip = true;
+                                     v.key = `${ele.key}_${v.id}`
+                                 })
+                            });
+                            let arr = [];
+                        res.data.head.forEach((element,index) => {
+                              arr.splice(2*index,0,element);
+                              arr.splice(2*index+1,0,{
+                                  title:res.data.head[index].title+''+'产值',
+                                  align:'center',
+                                  minWidth:100,
+                                  key:`${res.data.head[index].key}_time`
+                              })
+                        });
+                    this.setColumns = arr;
+                    res.data.list.forEach(v=>{
+                        if(v.procedure_list){
+                              if(v.procedure_list.length==0){
+                           
+                        }else{
+                            let key = Object.keys(v.procedure_list);
+                            console.log(key);
+                            key.forEach(ele=>{
+                              let k = Object.keys(v.procedure_list[ele]);
+                              k.forEach(e=>{
+                                  v[ele+'_'+e]=(v.procedure_list[ele][e].time).toString();
+                                  v[ele+'_time'] = v.procedure_list[ele][e].value;
+                              })
+                            })
+                            // console.log(v.procedure_list)
+                            // for(key in v.procedure_list){
+                            //     console.log(key)
+                            //    for(k in v.procedure_list[key]){
+                            //        v[key+''+k] = v.procedure_list[key][k].value
+                            //    } 
+                            // }
+                        //      v.procedure_list.each(data,(key,value)=>{
+                        //          value.each(val,(k,v)=>{
+                        //              v[key+''+k] = v.value
+                        //          })
+                        // })
+                        }
+                        }else{
+                             
+                        }
+                    })
+                    this.tableData = res.data.list;
+                    console.log(this.tableData);
+               })
+        },
         back(){
             this.$router.go(-1)
         }

+ 11 - 5
src/views/ProductValue/list.vue

@@ -10,17 +10,17 @@
       </FormItem>
             <FormItem label='项目编码:'>
                 <Select clearable v-model="searchData.order_no" filterable class="form_item">
-                    <Option/>
+                    <Option v-for="(item,index) in orderList" :key="index" :value="item" :label="item"/>
                 </Select>
             </FormItem>
             <FormItem label='项目名称:'>
                  <Select clearable v-model="searchData.project_title" filterable class="form_item">
-                    <Option/>
+                    <Option v-for="(item,index) in residentialName" :key="index" :value="item" :label="item"/>
                 </Select>
             </FormItem>
             <FormItem label='项目简称:'>
                  <Select clearable v-model="searchData.abbreviation" filterable class="form_item">
-                    <Option/>
+                    <Option v-for="(item,index) in abbreviation" :key="index" :value="item" :label="item"/>
                 </Select>
             </FormItem>
             <FormItem :label-width='40'>
@@ -54,13 +54,16 @@
 export default {
     data(){
         return{
+            abbreviation:[],
+            orderList:[],
+            residentialName:[],
             pageIndex:1,
             pageSize:10,
             total:0,
             tableData:[],
             tableColumns:[
                 {title:'项目编号',align:'center',minWidth:120,key:'order_no'},
-                {title:'项目名称',align:'center',minWidth:120,key:'project_title'},
+                {title:'项目名称',align:'center',minWidth:120,key:'client_name'},
                 {title:'项目简称',align:'center',minWidth:120,key:'abbreviation'},
                 {title:'在线小计',align:'center',minWidth:120,key:'online_price'},
                 {title:'完成小计',align:'center',minWidth:120,key:'finish_price'},
@@ -82,7 +85,10 @@ export default {
     methods:{
         initData(row){
 
-         this.axios.post('/api/contract_deep_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+         this.axios.post('/api/output_value_statement_list',{...row,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+             this.abbreviation = res.data.abbreviation;
+             this.residentialName = res.data.residential_name;
+             this.orderList = res.data.order_no;
              this.tableData = res.data.data;
              this.total = res.data.total;
          })

+ 205 - 0
src/views/brand/list.vue

@@ -0,0 +1,205 @@
+<template>
+  <div>
+    <FullPage title='品牌列表'
+              :list='list'
+              @init='init'
+              :loading='loading'
+              @searchData='init'
+              @changePage='changePage'
+              @changeSize='changeSize'
+              :tableColums='tableColums'
+              :tableData='tableData'
+              :pageIndex='pageIndex'
+              :total='total'>
+      <div slot='titleButton'>
+        <Button type="primary"
+                ghost
+                icon='md-add'
+                @click="addItems()">新增品牌</Button>
+      </div>
+      <div slot='navButton'>
+      </div>
+      <template slot='set'
+                slot-scope='{row}'>
+        <div class="table-set">
+          <svg style="font-size:20px"
+               color='#3764FF'
+               @click="addItems(row)"
+               class="icon icon-nav"
+               aria-hidden="true">
+            <use xlink:href="#iconbianji"></use>
+          </svg>
+
+          <svg @click="delItems(row)"
+               class="icon icon-nav"
+               style="font-size:20px"
+               color='red'
+               aria-hidden="true">
+            <use xlink:href="#iconshanchu"></use>
+          </svg>
+        </div>
+      </template>
+
+      <div>
+        <Modal class-name="vertical-center-modal"
+               :title="showType == 1 ? '新增品牌': '编辑品牌'"
+               v-model="showModal"
+               :width="480">
+          <Form :label-width="90">
+            <FormItem label="品牌名称:">
+              <Input placeholder=""
+                     v-model="classInfo.title" />
+            </FormItem>
+          </Form>
+
+          <div class="modal-footer"
+               slot='footer'>
+            <Button @click='showModal = false'>取消</Button>
+            <Button type="primary"
+                    @click="postInfo">确定</Button>
+          </div>
+        </Modal>
+      </div>
+
+    </FullPage>
+  </div>
+</template>
+
+<script>
+import { mapActions, mapState } from 'vuex'
+export default {
+  data () {
+    return {
+      list: [
+        { title: '品牌名称', name: 'Input', value: '', serverName: 'title', placeholder: '请输入品牌名称',size:'normal' },
+      ],
+      tableColums: [
+        { title: '序号', type: 'index', align: 'center', key: 'id', width: '100' },
+        { title: '品牌名称', align: 'center', key: 'title' },
+        { title: '操作', align: 'center', slot: 'set', width: '150' },
+      ],
+      tableData: [],
+      pageIndex: 1,
+      total: 0,
+      pageSize: 10,
+      showModal: false,
+      showType: 1,
+      classInfo: {
+      title:'',
+      id:''
+      },
+      proxyObj: {},
+      loading: false,
+      attribute: [{ title: '' }],
+      repeatFlag: false,
+    }  
+  },
+  
+  mounted () {
+  
+  },
+  methods: {
+    ...mapActions(['undata_Data']),
+    init (row) {
+      this.pageIndex = 1
+      row.page_index = this.pageIndex;
+      row.page_size = this.pageSize;
+      this.proxyObj = row;
+      this.getData(row)
+    },
+    getData (row) {
+      this.loading = true;
+      this.axios('/api/brand_list', { params: row }).then(res => {
+        this.loading = false;
+        this.tableData = res.data.data;
+        this.total = res.data.total;
+        // this.undata_navData()/////
+      })
+    },
+    changePage (e) {
+      this.pageIndex = e;
+      this.proxyObj.page_index = e;
+      this.getData(this.proxyObj)
+    },
+    changeSize (e) {
+      this.pageSize = e;
+      this.proxyObj.page_size = this.pageSize;
+      this.getData(this.proxyObj)
+    },
+    addItems (obj) {
+      this.showModal = true;
+      if (obj.id) {
+        this.showType = 2
+        this.classInfo.title = obj.title;
+    
+      } else {
+        //新增
+        this.showType = 1
+        this.classInfo.title = obj.title;
+
+      }
+    },
+    delItems (row) {
+      this.confirmDelete({
+        content: '确认删除么?',
+        then: () => {
+          this.axios.post('/api/brand_del', { id: row.id, title: row.title }).then(res => {
+            if (res.code == 200) {
+              this.$Message.success(res.msg)
+              this.getData(this.proxyObj)
+              this.undata_Data()
+            }
+          })
+        }
+      })
+    },
+    add (array) {
+      array.push({ title: '' })
+    },
+    remove (array, n) { array.splice(n, 1) },
+    postInfo () {
+      let postData = {}, post_url = '';
+      if (this.showType == 1) {
+        post_url = '/api/brand_add';
+       postData.title = this.classInfo.title;
+        // postData = {
+        //   id: this.classInfo.id,
+        //   title: result.join(',')
+        // }
+      } else {
+        post_url = '/api/brand_edit'
+        postData = this.classInfo;
+      }
+      this.axios.post(post_url, postData).then(res => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg)
+          this.getData(this.proxyObj)
+          this.undata_Data()
+          this.showModal = false;
+        } else {
+          if (Array.isArray(res.data)) {
+            this.repeatFlag = true
+            let result = []
+            res.data.map(v => {
+              let obj = {};
+              v ? obj.title = v : ''
+              obj.title ? result.push(obj) : ''
+            })
+            this.attribute = result;
+            this.getData(this.proxyObj)
+            this.undata_Data()
+          }
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.item-attr {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+}
+</style>

+ 5 - 2
src/views/leadMatch/MatchList/HXYMatchCheck.vue

@@ -405,13 +405,16 @@ export default {
         {
           title: "贴皮方式",
           align: "center",
-          key: "cut_number",
+          key: "skin",
           minWidth: 90,
+          render:(h,params)=>{
+            return h('span',{},params.row.skin==1?'单':params.row.skin ==2?'双':'素板')
+          }
         },
         {
           title: "封边",
           align: "center",
-          key: "unbind_number",
+          key: "band",
           minWidth: 90,
         },
         { title: "贴皮面积", align: "center", key: "skin_area", minWidth: 100 },

+ 7 - 1
src/views/leadMatch/MatchList/HXYMatchPage.vue

@@ -992,6 +992,9 @@ export default {
           align: "center",
           key: "skin",
           minWidth: 90,
+          render:(h,params)=>{
+            return h('span',{},params.row.skin==1?'单':params.row.skin ==2?'双':'素板')
+          }
         },
         {
           title: "封边",
@@ -1048,11 +1051,14 @@ export default {
           key: "num",
           minWidth: 80,
         },
-        {
+         {
           title: "贴皮方式",
           align: "center",
           key: "skin",
           minWidth: 90,
+          render:(h,params)=>{
+            return h('span',{},params.row.skin==1?'单':params.row.skin ==2?'双':'素板')
+          }
         },
         {
           title: "封边",