mushencc 3 anos atrás
pai
commit
54fb46a53b

+ 44 - 0
src/routerMap/index.js

@@ -1363,6 +1363,50 @@ const routerMap = [{
                 '@/views/BasicSettings/CustomerFiles/CustomerClassify',
             ], resolve),
     },
+    {
+        path: '/cms/newPage/roomList/list',
+        name: 'RoomList', //房间列表
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/roomList/list',
+            ], resolve),
+    },
+    {
+        path: '/cms/newPage/roomList/edit',
+        name: 'RoomListEdit', //房间列表-->新增/编辑/查看
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/roomList/edit',
+            ], resolve),
+    },
+    {
+        path: '/cms/newPage/weightMemo/list',
+        name: 'WeightMemo', //码单列表
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/weightMemo/list',
+            ], resolve),
+    },
+    {
+        path: '/cms/newPage/weightMemo/edit',
+        name: 'WeightMemoEdit', //码单列表-->新增/编辑/查看
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require([
+                '@/views/newpage/weightMemo/edit',
+            ], resolve),
+    },
     // 测试用
     {
         path: '/cms/ordermannage/businessorderlist/editcopy',

+ 3 - 3
src/views/BasicSettings/SuppliersManage/SippliersStockPriceList.vue

@@ -205,13 +205,13 @@ export default {
             onOk: () => {
               this.axios({
                 method: 'get',
-                url: '/api/supply_material_add',
+                url: '/api/supply_material_del',
                 params: {
                   supply_id: row.supply_id
                 }
               }).then((res) => {
-                // this.$Message.success(res.msg)
-                // this.initData()
+                this.$Message.success(res.msg)
+                this.initData()
               }).catch((err) => { });
             },
             onCancel: () => { }

+ 56 - 1
src/views/Warehouse/Warehouse/stockingList.vue

@@ -73,7 +73,9 @@
     <div class="warehouseList_content">
       <Table :columns="tableColums"
              :data="tableData"
-             border>
+             border
+             :summary-method="handleSummary"
+             show-summary>
       </Table>
       <div class="pageSlotStyle">
         <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
@@ -171,6 +173,59 @@ export default {
     this.axios('/api/material').then(res => { this.materialNameList = res.data.data })
   },
   methods: {
+     handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    const key = column.key;
+                    if (index === 0) {
+                        sums[key] = {
+                            key,
+                            value: '合计'
+                        };
+                        return;
+                    }
+                    let val = data;
+                    for(let i in val){
+                      val[i].total = val[i].total_price*val[i].num;
+                    }
+                    const values = val.map(item => Number(item[key]));
+                    if (index === 7) {
+                        const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v 
+                        };
+                    }else if(index===5){
+                       const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v 
+                        };
+                    }
+                     else {
+                        sums[key] = {
+                            key,
+                            value: ''
+                        };
+                    }
+                });
+
+                return sums;
+            },
     handleSearchData () {
       let obj = {
         warehouse_id: this.searchData.warehouse_id ? this.searchData.warehouse_id.join(',') : null,

+ 8 - 0
src/views/newpage/roomList/edit.vue

@@ -0,0 +1,8 @@
+<template>
+    <div></div>
+</template>
+<script>
+export default {
+    
+}
+</script>

+ 120 - 0
src/views/newpage/roomList/list.vue

@@ -0,0 +1,120 @@
+<template>
+  <div>
+    <Toptitle title="码单列表">
+      <slot name="titleButton"> </slot>
+    </Toptitle>
+    <div class="weight_memo_content">
+      <div>
+        <Topsearch :list="list" @init="initData" @searchData="initData" />
+        <div style="padding-bottom: 15px">
+          <slot name="navButton"> </slot>
+        </div>
+      </div>
+      <div
+        style="
+          text-align: right;
+          margin: 10px;
+          border-top: 1px solid #f4f4f4;
+          padding-top: 10px;
+        "
+      >
+        <Button type="primary" size="small" style="margin-right: 10px"
+          >新增</Button
+        >
+      </div>
+      <Table :columns="tableColumns" border :data="tableData">
+        <template slot="set" slot-scope="{ row, index }">
+             <a style="margin:0 5px">编辑</a>
+             <a style="margin:0 5px">查看</a>
+             <a style="margin:0 5px;color:red;">删除</a>
+        </template>  
+     </Table>
+    </div>
+      <div class="content_body_page">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                show-elevator
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      list: [
+        {
+          title: "项目编号",
+          name: "Input",
+          value: "",
+          placeholder: "请输入项目编号",
+          serverName: "title",
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          value: "",
+          placeholder: "请输入项目名称",
+          serverName: "title",
+        },
+        {
+          title: "项目简称",
+          name: "Input",
+          value: "",
+          placeholder: "请输入项目简称",
+          serverName: "title",
+        },
+        {
+          title: "匹配状态",
+          name: "Select",
+          value: "",
+          placeholder: "请选择",
+          serverName: "type_id",
+          option: [
+            { label: "已匹配", value: 1 },
+            { label: "未匹配", value: 0 },
+          ],
+        },
+      ],
+      tableColumns: [
+        { title: "项目编码", key: "type_code", align: "center", minWidth: 140 },
+        { title: "项目名称", key: "type_code", align: "center", minWidth: 140 },
+        { title: "项目简称", key: "type_code", align: "center", minWidth: 140 },
+        { title: "匹配状态", key: "type_code", align: "center", minWidth: 140 },
+        { title: "制单日期", key: "type_code", align: "center", minWidth: 140 },
+        { title: "操作", key: "type_code", align: "center", minWidth: 140 ,solt:'set'},
+      ],
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      total: 0,
+    };
+  },
+  methods: {
+    initData() {},
+    changeSize (e) {
+      this.pageSize = e;
+      this.initData()
+    },
+     changePage (e) {
+      this.pageIndex = e;
+      this.initData()
+    },
+  },
+};
+</script>
+<style scoped lang='scss'>
+.weight_memo_content{
+    height: 650px;
+    overflow: auto;
+}
+.content_body_page{
+    margin-top: 10px;
+    text-align: center;
+}
+</style>

+ 230 - 0
src/views/newpage/weightMemo/edit.vue

@@ -0,0 +1,230 @@
+<template>
+  <div>
+    <Toptitle title="码单信息">
+      <slot name="titleButton">
+        <Button style="margin-left:10px" type="primary">导入</Button>
+        <Button style="margin-left:10px" @click="$router.go(-1)">返回</Button>
+        <Button style="margin-left:10px">保存</Button>
+      </slot>
+    </Toptitle>
+    <div class="weight_memo_info_content">
+      <div class="form_content">
+        <Form :label-width="85" :model="formData">
+          <FormItem label="项目编码:">
+            <Input />
+          </FormItem>
+          <FormItem label="项目名称:">
+            <Input />
+          </FormItem>
+          <FormItem label="项目简称:">
+            <Input />
+          </FormItem>
+          <FormItem label="下单日期:">
+            <DatePicker
+              type="date"
+              v-model="formData.start_time"
+              placeholder="年/月/日"
+            ></DatePicker>
+          </FormItem>
+        </Form>
+      </div>
+      <Card v-for="(item,index) in infoNumber" :key="index">
+          <div class="table_header">
+            <div class="table_header_left">
+              <span>图号:{{item.url_number}}</span>
+              <span>产品名称:{{item.product_title}}</span>
+              <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">删除</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>
+          </div>
+          <div v-if="item.showType">
+          <div>
+            <Topsearch :list="list" @searchData="initData" />
+          </div>
+          <div v-for="(_item,_index) in tableData" :key="_index">
+              <div class="mate_info"><div>匹配信息:{{_item.match_info}}</div><span>总计{{_item.total}}条数据</span></div>
+              <Table :columns="tableColumns" border :data="_item.data">
+              </Table>
+          </div>
+        </div>
+      </Card>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      formData: {
+        start_time: "",
+      },
+      tableData:[{
+          match_info:'w1=300 w2=550 w3==900 2组',
+          total:3,
+          data:[
+              {part_title:'饰面1',line_number:2,veneer_one:'橡木',material:'12cm多层板',veneer_two:'橡木',wollens_size:'315*565*150', material_num:'121',vacuum_size:'300*550*150',part_num:'111',treatment_area:'8.88',vacuum_area:'300*200*150',technological_requirements:'按图七口',match_state:'1'},
+              {part_title:'饰面2',line_number:3,veneer_one:'橡木',material:'12cm多层板',veneer_two:'橡木',wollens_size:'315*565*150', material_num:'3',vacuum_size:'300*550*150',part_num:'5',treatment_area:'8.88',vacuum_area:'300*200*150',technological_requirements:'按图七口',match_state:'0'},
+              {part_title:'饰面3',line_number:3,veneer_one:'橡木',material:'12cm多层板',veneer_two:'橡木',wollens_size:'315*565*150', material_num:'2',vacuum_size:'300*550*150',part_num:'7',treatment_area:'8.88',vacuum_area:'300*200*150',technological_requirements:'按图七口',match_state:'1'},
+          ]
+      },
+      {
+          match_info:'w1=300 w2=550 w3==900 3组',
+          total:3,
+          data:[
+              {part_title:'饰面1',line_number:2,veneer_one:'橡木',material:'12cm多层板',veneer_two:'橡木',wollens_size:'315*565*150', material_num:'121',vacuum_size:'300*550*150',part_num:'111',treatment_area:'8.88',vacuum_area:'300*200*150',technological_requirements:'按图七口',match_state:'1'},
+              {part_title:'饰面2',line_number:3,veneer_one:'橡木',material:'12cm多层板',veneer_two:'橡木',wollens_size:'315*565*150', material_num:'3',vacuum_size:'300*550*150',part_num:'5',treatment_area:'8.88',vacuum_area:'300*200*150',technological_requirements:'按图七口',match_state:'0'},
+              {part_title:'饰面3',line_number:3,veneer_one:'橡木',material:'12cm多层板',veneer_two:'橡木',wollens_size:'315*565*150', material_num:'2',vacuum_size:'300*550*150',part_num:'7',treatment_area:'8.88',vacuum_area:'300*200*150',technological_requirements:'按图七口',match_state:'1'},
+          ]
+      }
+      ],
+      searchData: {},
+      tableColumns:[
+            { title: "序号", type:'index', align: "center", minWidth: 140 },
+              { title: "部件名称", key: "part_title", align: "center", minWidth: 140 },
+                { title: "行号", key: "line_number", align: "center", minWidth: 140 },
+                  { title: "木皮1", key: "veneer_one", align: "center", minWidth: 140 },
+                    { 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: "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 },
+      ],
+      showType: false,
+      //进入页面需要获取的数值
+      infoNumber:[
+          {url_number:'001',product_title:'木饰面',state:0,total:6,showType:false},
+          {url_number:'004',product_title:'木饰面',state:1,total:6,showType:false},
+          {url_number:'007',product_title:'台盆柜',state:2,total:6,showType:false},
+      ],
+      icoState:'md-arrow-dropright',
+    };
+  },
+  mounted(){
+
+  },
+  computed: {
+    list() {
+      return [{
+          title: "特殊尺寸",
+          name: "Select",
+          value: "",
+          placeholder: "请选择",
+          serverName: "type_id",
+          option: [
+            { label: "已匹配", value: 1 },
+            { label: "未匹配", value: 0 },
+          ]
+      },
+      {
+          title: "部件名称",
+          name: "Select",
+          value: "",
+          placeholder: "请选择",
+          serverName: "type_id",
+          option: [
+            { label: "已匹配", value: 1 },
+            { label: "未匹配", value: 0 },
+          ]
+      },
+      {
+          title: "精裁尺寸",
+          name: "Select",
+          value: "",
+          placeholder: "请选择",
+          serverName: "type_id",
+          option: [
+            { label: "已匹配", value: 1 },
+            { label: "未匹配", value: 0 },
+          ]
+      },
+      {
+          title: "匹配状态",
+          name: "Select",
+          value: "",
+          placeholder: "请选择",
+          serverName: "type_id",
+          option: [
+            { label: "已匹配", value: 1 },
+            { label: "未匹配", value: 0 },
+          ]
+      }
+        ];
+    },
+  },
+  methods: {
+    initData() {},
+    show(item,index) {
+        item.showType = !item.showType
+        if(item.showType){           //全部未展开
+            this.infoNumber.forEach(_item=>{
+           _item.showType = false;
+        })
+             document.getElementsByClassName('ico')[index].style.transform = 'rotate(90deg)'
+             item.showType = true
+        }else{    //展开其中一项
+             this.infoNumber.forEach(_item=>{
+           _item.showType = false;
+        })
+            document.getElementsByClassName('ico')[index].style.transform = 'rotate(0deg)'
+        }
+       
+    },
+  },
+};
+</script>
+<style scoped lang='scss'>
+.weight_memo_info_content{
+    height: 700px;
+    overflow: auto;
+}
+.form_content {
+  margin-top: 10px;
+  /deep/.ivu-form {
+    display: flex;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+  }
+  /deep/.ivu-form-item {
+    display: inline-block;
+    width: 250px;
+  }
+}
+.table_header {
+  display: flex;
+  justify-content: space-between;
+  .table_header_left{
+      span{
+          margin: 0 20px;
+      }
+  }
+  .table_header_right {
+      width: 240px;
+    display: flex;
+    justify-content: space-around;
+  }
+}
+.mate_info{
+    display: flex;
+    justify-content: space-between;
+    margin: 20px 0;
+}
+.ico{
+   height:14px;
+   transition: all 0.4s;
+   vertical-align: middle;
+}
+/deep/ .ivu-card{
+    border-radius: 15px;
+    margin: 15px 0;
+    background: rgb(236, 236, 236);
+}
+</style>

+ 120 - 0
src/views/newpage/weightMemo/list.vue

@@ -0,0 +1,120 @@
+<template>
+  <div>
+    <Toptitle title="码单列表">
+      <slot name="titleButton"> </slot>
+    </Toptitle>
+    <div class="weight_memo_content">
+      <div>
+        <Topsearch :list="list" @init="initData" @searchData="initData" />
+        <div style="padding-bottom: 15px">
+          <slot name="navButton"> </slot>
+        </div>
+      </div>
+      <div
+        style="
+          text-align: right;
+          margin: 10px;
+          border-top: 1px solid #f4f4f4;
+          padding-top: 10px;
+        "
+      >
+        <Button type="primary" size="small" style="margin-right: 10px"
+          >新增</Button
+        >
+      </div>
+      <Table :columns="tableColumns" border :data="tableData">
+        <template slot="set" slot-scope="{ row, index }">
+             <a style="margin:0 5px">编辑</a>
+             <a style="margin:0 5px">查看</a>
+             <a style="margin:0 5px;color:red;">删除</a>
+        </template>  
+     </Table>
+    </div>
+      <div class="content_body_page">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                show-elevator
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      list: [
+        {
+          title: "项目编号",
+          name: "Input",
+          value: "",
+          placeholder: "请输入项目编号",
+          serverName: "title",
+        },
+        {
+          title: "项目名称",
+          name: "Input",
+          value: "",
+          placeholder: "请输入项目名称",
+          serverName: "title",
+        },
+        {
+          title: "项目简称",
+          name: "Input",
+          value: "",
+          placeholder: "请输入项目简称",
+          serverName: "title",
+        },
+        {
+          title: "匹配状态",
+          name: "Select",
+          value: "",
+          placeholder: "请选择",
+          serverName: "type_id",
+          option: [
+            { label: "已匹配", value: 1 },
+            { label: "未匹配", value: 0 },
+          ]
+        },
+      ],
+      tableColumns: [
+        { title: "项目编码", key: "type_code", align: "center", minWidth: 140 },
+        { title: "项目名称", key: "type_code", align: "center", minWidth: 140 },
+        { title: "项目简称", key: "type_code", align: "center", minWidth: 140 },
+        { title: "匹配状态", key: "type_code", align: "center", minWidth: 140 },
+        { title: "制单日期", key: "type_code", align: "center", minWidth: 140 },
+        { title: "操作", key: "type_code", align: "center", minWidth: 140 ,solt:'set'},
+      ],
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      total: 0,
+    };
+  },
+  methods: {
+    initData() {},
+    changeSize (e) {
+      this.pageSize = e;
+      this.initData()
+    },
+     changePage (e) {
+      this.pageIndex = e;
+      this.initData()
+    },
+  },
+};
+</script>
+<style scoped lang='scss'>
+.weight_memo_content{
+    height: 650px;
+    overflow: auto;
+}
+.content_body_page{
+    margin-top: 10px;
+    text-align: center;
+}
+</style>