mushencc пре 3 година
родитељ
комит
00620cf2e0

+ 18 - 0
src/routerMap/index.js

@@ -687,6 +687,24 @@ const routerMap = [
       require(["@/views/BidSystem/ContractList/edit"], resolve),
   },
   {
+    path: "/cms/BidSystem/ContractList/urlLeading",
+    name: "BidSystemContractUrlLeading", // 报价系统→工装订单→图号导入
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/ContractList/urlLeading"], resolve),
+  },
+  {
+    path: "/cms/BidSystem/ContractList/detailReport",
+    name: "BidSystemContractdetailReport", // 报价系统→工装订单→图号导入->统计报表
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/ContractList/detailReport"], resolve),
+  },
+  {
     path: "/cms/BidSystem/ContractList/info",
     name: "BidSystemContractInfo", // 报价系统→工装订单→详情页
     meta: {

+ 14 - 2
src/views/BidSystem/ContractList/BSTList.vue

@@ -2,6 +2,7 @@
   <div class="BidsList">
      <Toptitle title="工装订单">
       <slot name="titleButton">
+         <Button type="primary" ghost style="margin-right:10px" @click="goDetailPage">统计报表</Button>
         <Button type="primary"
                 style="margin-right:10px;"
            
@@ -43,7 +44,8 @@
         </template>
         <template slot="set" slot-scope="{row}"> 
           <a @click="goPageDetail(row,1)" style="margin-right:10px">编辑</a>
-          <a @click="goPageDetail(row,2)">详情</a>
+          <a @click="goPageDetail(row,2)" style="margin-right:10px">详情</a>
+          <a @click="goPageDetail(row,3)">图号导入</a>
         </template>
         </Table>
     </div>
@@ -98,6 +100,9 @@ export default {
     this.getData();
   },
  methods:{
+    goDetailPage(){
+           this.$router.push({path:'/cms/BidSystem/ContractList/detailReport'})
+        },
    init(){
       let data = [];
       data=JSON.parse(JSON.stringify(this.searchData));
@@ -106,7 +111,14 @@ export default {
       this.getData(data)
    },
    goPageDetail(row,type){
-         this.$router.push({path:'/cms/BidSystem/ContractList/edit',query:{order_no:row.order_no,type}})
+     switch(type){
+       case 1:
+         case 2:this.$router.push({path:'/cms/BidSystem/ContractList/edit',query:{order_no:row.order_no,type}})
+         break;
+         case 3:this.$router.push({path:'/cms/BidSystem/ContractList/urlLeading',query:{order_no:row.order_no,type}})
+         break;
+     }
+         
    },
    changeSize(e){
         this.pageSize = e;

+ 77 - 0
src/views/BidSystem/ContractList/detailReport.vue

@@ -0,0 +1,77 @@
+<template>
+    <div>
+    <Toptitle title="统计报表">
+          <Button type="primary" @click="back()">返回</Button>
+    </Toptitle>
+    <div style="height:85%;over-flow:auto">
+   <Table :data='tableData' :columns='tableColumns' border max-height='550' style="margin-top:20px">
+
+     </Table>
+     </div>
+       <div class="content_page">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return {
+            pageIndex:1,
+            pageSize:10,
+            total:0,
+      tableData:[],
+      tableColumns:[
+          {title:'项目',align:'center',key:'title',minWidth:150},
+             {title:'码单日期',align:'center',key:'order_time',minWidth:150},
+                {title:'码单完成比例',align:'center',key:'order_rate',minWidth:150},
+                   {title:'木工',align:'center',key:'mg',minWidth:150},
+                      {title:'木工完成比例',align:'center',key:'mg_rate',minWidth:150},
+                         {title:'油漆',align:'center',key:'yq',minWidth:150},
+                            {title:'油漆完成比例',align:'center',key:'yq_rate',minWidth:150},
+                               {title:'包装',align:'center',key:'bz',minWidth:150},  
+                                {title:'包装完成比例',align:'center',key:'bz_rate',minWidth:150},
+                                {title:'发货',align:'center',key:'fh',minWidth:150},
+                                {title:'发货完成比例',align:'center',key:'fh_rate',minWidth:150},
+                                {title:'安装',align:'center',key:'az',minWidth:150},
+                                {title:'安装完成比例',align:'center',key:'az_rate',minWidth:150}
+      ]
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        changeSize(e){
+           this.pageSize = e;
+           this.initData();
+        },
+        changePage(e){
+          this.pageIndex = e;
+          this.initData();
+        },
+        initData(){
+         this.axios.get('/api/bst_order_total_list',{params:{page_index:this.pageIndex,page_size:this.pageSize}}).then(res=>{
+         this.total = res.data.total;
+         this.tableData = res.data.data;
+         })
+
+        },
+        back(){
+            this.$router.go(-1);
+        }
+    }
+}
+</script>
+<style scoped lang='scss'>
+.content_page{
+    text-align: center;
+}
+</style>

+ 187 - 0
src/views/BidSystem/ContractList/urlLeading.vue

@@ -0,0 +1,187 @@
+<template>
+    <div>
+     <Toptitle title="图纸导入">
+         <Button type="primary" ghost style="margin-right:10px" @click="getPlanData">下计划</Button>
+          <Button type="primary" ghost style="margin-right:10px" @click="showURL= true">补图号</Button>
+             <Button type="primary" ghost style="margin-right:10px" @click="postData">保存</Button>
+         <!-- <Button type="primary" ghost style="margin-right:10px" @click="goDetailPage">统计报表</Button> -->
+         <Button type="primary" @click="back()">返回</Button>
+     </Toptitle>
+     <div style="height:80%;over-flow:auto">
+     <Form style="display:flex;margin-top:15px">
+         <FormItem label='图号:' style="width:420px;display:flex;" :label-width='50'>
+             <Input style="width:150px;margin-left:-30px" v-model="url_number.start_number"/>
+             ~
+             <Input style="width:150px" v-model="url_number.end_number"/>
+         </FormItem>
+         <FormItem>
+             <Button type="primary" @click="searchURL(url_number)">导入</Button>
+         </FormItem>
+     </Form>
+     <Table :data='tableData' :columns='tableColumns' border max-height='550'
+     @on-selection-change='tableSelect'
+     >
+     </Table>
+     </div>
+      <div class="content_page">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    <Modal title="下计划" width='600' v-model="showModal" @on-ok='postPlanData'>
+       
+        <Form style="margin-top:20px">
+            <FormItem :label='`${item.title}时间:`' style="width:100%;" v-for="item in planData" :key="item.id"><DatePicker type="date" placeholder='年/月/日' v-model="item.start_time" style="width:30%"/>~<DatePicker type="date" v-model="item.end_time" placeholder='年/月/日' style="width:30%"/></FormItem>
+            <!-- <FormItem label='结束时间:' style="width:100%"><DatePicker type="date" placeholder='年/月/日' style="width:30%"/>~<DatePicker type="date" placeholder='年/月/日' style="width:30%"/></FormItem> -->
+        </Form>
+        
+    </Modal>
+      <Modal title="补图号" width='400' v-model="showURL" @on-ok='handleMendUrl'>
+       
+        <Form style="margin-top:20px">
+            <FormItem label='图号:' style="width:100%;"><Input v-model="mend_url_number" style="width:50%"/></FormItem>
+        </Form>
+        
+    </Modal>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return {
+            planData:[],
+            selectData:[],
+            mend_url_number:'',
+            showURL:false,
+            showModal:false,
+            url_number:{
+               start_number:'',
+               end_number:''
+            },
+            total:0,
+            pageSize:10,
+            pageIndex:1,
+           tableData:[],
+           tableColumns:[
+               {type:'selection',align:'center',minWidth:50},
+               {title:'图号',align:'center',minWidth:80,key:'pic_number'},
+               {title:'合同金额',align:'center',minWidth:90,key:'contract_price',render:(h,params)=>{
+                   const {row,index} = params;
+                   const currentRow = this.tableData[index];
+                   return h('Input',{props:{value:row.contract_price},on:{'on-change':(e)=>{
+                         currentRow.contract_price = e.target.value;
+                         this.tableData.splice(index,1,currentRow);
+                   }}})
+               }},
+               {title:'核量金额',align:'center',minWidth:90,key:'quantity_price',render:(h,params)=>{
+                   const {row,index} = params;
+                   const currentRow = this.tableData[index];
+                   return h('Input',{props:{value:row.quantity_price},on:{'on-change':(e)=>{
+                         currentRow.quantity_price = e.target.value;
+                         this.tableData.splice(index,1,currentRow);
+                   }}})
+               }}
+           ]
+        }
+    },
+    mounted(){
+            this.initData();
+     },
+    methods:{
+        getPlanData(){
+             if(this.selectData.length==0){
+                 return this.$Message.warning('请先选择图号!')
+             }
+             this.axios.get('/api/basics_procedure_index').then(res=>{
+              this.planData = res.data.data;
+              this.planData.forEach(v=>{
+                  v.basic_procedure_id = v.id
+                  v.start_time='';
+                  v.end_time='';
+              })
+              this.showModal=true
+             })
+        },
+        postPlanData(){
+            let time = JSON.parse(JSON.stringify(this.planData));
+            time.forEach(v=>{
+                v.start_time = v.start_time?Date.parse(v.start_time).toString().slice(0,10):'';
+            v.end_time = v.end_time?Date.parse(v.end_time).toString().slice(0,10):'';
+            })
+            let obj = {};
+            obj.type=-1;
+            obj.order_no = this.$route.query.order_no;
+            obj.procedure_list = time;
+             obj.pic_number = [];
+            this.selectData.forEach(v=>{
+                     obj.pic_number.push(v.id)
+            })
+           
+
+          this.axios.post('/api/bst_order_pic_number_detail_edit',obj).then(res=>{
+                     if(res.code==200){
+                         this.initData();
+                     }
+          })
+        },
+        tableSelect(e){
+        this.selectData = e;
+        },
+        postData(){
+           this.axios.post('/api/bst_order_pic_number_price_edit',{order_no:this.$route.query.order_no,procedure_list:[...this.tableData]}).then(res=>{
+                if(res.code == 200){
+                    this.initData();
+                }
+           })
+        },
+        handleMendUrl(){
+          let obj = {};
+          obj.start_number = this.mend_url_number;
+          this.searchURL(obj);
+        },
+        initData(){
+           this.axios.get('/api/bst_order_pic_number_list',{params:{order_no:this.$route.query.order_no,page_size:this.pageSize,page_index:this.pageIndex}}).then(res=>{
+                this.tableData = res.data.data;
+                this.total = res.data.total;
+           })
+        },
+        // goDetailPage(){
+        //    this.$router.push({path:'/cms/BidSystem/ContractList/detailReport',query:{order_no:this.$route.query.order_no}})
+        // },
+        back(){
+        this.$router.go(-1)
+        },
+        searchURL(row){
+            let obj = {};
+            obj.order_no = this.$route.query.order_no;
+            obj.pic_number = {
+                start_pic_number :row.start_number?row.start_number:'',
+                end_pic_number:row.end_number?row.end_number:''
+            }
+               this.axios.post('/api/bst_order_pic_number_edit',{...obj}).then(res=>{
+                       if(res.code == 200){
+                           this.initData();
+                       }
+               })
+        },
+        changeSize(e){
+            this.pageSize = e;
+            this.initData();
+        },
+        changePage(e){
+           this.pageIndex = e;
+            this.initData();
+        }
+    }
+}
+</script>
+<style scoped lang='scss'>
+.content_page{
+    text-align: center;
+}
+</style>

+ 5 - 5
src/views/BidSystem/OutputValue/total.vue

@@ -13,15 +13,15 @@ export default {
            tableData:[],
             tableColumns:[
                 {title:'本月',align:'center',minWidth:300,children:[
-                    {title:"本厂",align:'center',key:'local_value',minWidth:100},
-                    {title:"外协",align:'center',key:'un_local_value',minWidth:100},
-                    {title:"合计",align:'center',key:'total',minWidth:100}
-                ]},
-                 {title:'本年',align:'center',minWidth:300,children:[
                     {title:"本厂",align:'center',key:'month_local_value',minWidth:100},
                     {title:"外协",align:'center',key:'month_un_local_value',minWidth:100},
                     {title:"合计",align:'center',key:'month_total',minWidth:100}
                 ]},
+                 {title:'本年',align:'center',minWidth:300,children:[
+                    {title:"本厂",align:'center',key:'local_value',minWidth:100},
+                    {title:"外协",align:'center',key:'un_local_value',minWidth:100},
+                    {title:"合计",align:'center',key:'total',minWidth:100}
+                ]},
             ]
         }
     },

+ 25 - 7
src/views/BidSystem/ProductDeOrder/deorderdetail.vue

@@ -78,7 +78,7 @@
           placeholder="请输入价格"
         />
       </div> -->
-      <div>
+      <!-- <div>
         <span>型号:</span>
         <Input
           type="text"
@@ -88,8 +88,8 @@
           style="width: 150px; margin-right: 10px"
           placeholder="请输入型号"
         />
-      </div>
-      <div>
+      </div> -->
+      <!-- <div>
         <div
           style="
             display: flex;
@@ -114,7 +114,7 @@
             >{{ nowSelectObj.title || "" }}</a
           >
         </div>
-      </div>
+      </div> -->
       <Button
         @click="handleSimilarProductShow"
         type="primary"
@@ -122,6 +122,16 @@
         style="margin-right: 10px"
         >选择相似产品</Button
       >
+      <Form :label-width='100' style="display:flex;">
+        <FormItem label="项目名称:" style="position: relative;
+    top: 8px;width:250px">
+          <Input size="small" clearable v-model="sameData.project_name"/>
+        </FormItem>
+        <FormItem label='图号:' style="position: relative;
+    top: 8px;width:250px">
+          <Input size='small' clearable v-model="sameData.url_number"/>
+        </FormItem>
+      </Form>
     </div>
     <div
       class="parts"
@@ -727,7 +737,7 @@
             type="text"
             size="small"
             clearable
-            v-model="similarProductData.project_title"
+            v-model="similarProductData.residential_name"
             style="width: 120px"
           />
         </FormItem>
@@ -1052,6 +1062,10 @@ export default {
   data() {
     // 这里存放数据
     return {
+      sameData:{
+        project_title:'',
+        url_number:'',
+      },
       headers: { Authorization: localStorage.getItem("token") },
       modal_show:false,
       // 1拆单 2详情
@@ -1353,7 +1367,7 @@ export default {
         // { title: "产品分类", key: "type_name", align: "center", minWidth: 80 },
         // { title: "产品名称", key: "title", align: "center", minWidth: 80 },
         // { title: "产品型号", key: "model", align: "center", minWidth: 80 },
-         { title: "项目名称", key: "project_title", align: "center", minWidth: 80 },
+         { title: "项目名称", key: "residential_name", align: "center", minWidth: 80 },
         { title: "图号", key: "url_number", align: "center", minWidth: 80 },
       ],
       processLineData: {
@@ -1667,8 +1681,9 @@ export default {
       this.similarProductData.title = "";
       this.similarProductData.model = "";
       this.similarProductData.url_number = "";
-      this.axios("/api/product", {
+      this.axios("/api/order_product", {
         params: {
+          order_no:this.$route.query.order_no,
           type_id: this.similarProductData.type_id,
           title: this.similarProductData.title,
           model: this.similarProductData.model,
@@ -1731,10 +1746,13 @@ export default {
     },
     handleSimilarProductConfirm(id, isEditItem, result) {
       if (id) {
+        console.log(this.tempSimilarProductData)
+        this.sameData.project_title = this.tempSimilarProductData.title;
         this.axios({
           method: "get",
           url: "/api/product",
           params: {
+          // order_no:this.$route.query.order_no,
             id,
           },
         }).then((res) => {

+ 31 - 0
src/views/ChipPrintScreen/ChipPrintScreenCheck.vue

@@ -13,6 +13,14 @@
         >
           {{ isWideScreen ? "完整模式" : "简单模式" }}
         </Button>
+         <Button
+          @click="handleSearchChip"
+          size="large"
+          type="primary"
+          style="margin-right: 1rem"
+        >
+          搜索芯片
+        </Button>
         <Button
           @click="handlePrint"
           size="large"
@@ -399,6 +407,24 @@
         </Button>
       </div>
     </Modal>
+    <Modal v-model="searchChip">
+      <div slot="header" style="text-align:center">
+        <span>芯片编码</span>
+      </div>
+      <div style="text-align:center"><Input placeholder="芯片编码" style="width:70%"></Input><Icon type="md-search" style="position: relative;
+    right: 20px;"/></div>
+      <div>
+      </div>
+      <div>
+
+      </div>
+      <div slot="footer">
+        <Button>返回</Button>
+        <Button @click="handlePrintComfirm(selectedObj,null,item.printerUsbPort,item.printer_brand)" type="primary" v-for="item in printTip" :key="item.id">
+           {{item.title}}
+          </Button>
+      </div>
+    </Modal>
     <Modal
       class="selection-print-modal"
       v-model="printModal"
@@ -547,6 +573,8 @@ export default {
   data() {
     // 这里存放数据
     return {
+      chipData:[],
+      searchChip:false,
       printTip:[],
       tagPrintList:[],
       show: false,
@@ -622,6 +650,9 @@ export default {
     console.log(this.printTip);
   },
   methods: {
+    handleSearchChip(){
+         this.searchChip = true;
+    },
      Print(row,type){
        if (
         type &&

+ 1 - 1
src/views/PurchasingManage/InstockOrder/detail.vue

@@ -18,7 +18,7 @@
             <FormItem label='采购入库单号:' style="width:290px">{{formData.order_in_no}}</FormItem>
             <FormItem label='供应商名称:' style="width:290px">{{formData.supply_title}}</FormItem>
             <FormItem label='仓库:' style="width:290px">{{formData.warehouse_title}}</FormItem>
-            <FormItem label='入库类型:' style="width:290px">{{formData.type_id==1?'采购':'库存'}}</FormItem>
+            <FormItem label='入库类型:' style="width:290px">{{formData.type_title}}</FormItem>
             <FormItem label='单据日期:' style="width:290px">{{this.func.replaceDateNoHMS(formData.order_time)}}</FormItem>
             <FormItem label='制单人:' style="width:290px">{{formData.user_name}}</FormItem>
             <FormItem label='订单创建时间:' style="width:290px">{{this.func.replaceDateNoHMS(formData.crt_time)}}</FormItem>

+ 1 - 2
src/views/PurchasingManage/InstockOrder/list.vue

@@ -214,8 +214,7 @@ export default {
           title: '入库类型', key: 'type', align: 'center', minWidth: 120,
           render: (h, params) => {
             const { row } = params
-            const text = row.type_id == 1 ? '采购' : '库存'
-            return h('span', {}, text)
+            return h('span', {}, row.type_title)
           }
         },
         {

+ 1 - 1
src/views/PurchasingManage/OutstockOrder/detail.vue

@@ -18,7 +18,7 @@
             <FormItem label='领料出库单号:' style="width:290px">{{formData.order_out_no}}</FormItem>
             <FormItem label='项目名称:' style="width:290px">{{formData.project_title}}</FormItem>
             <FormItem label='仓库:' style="width:290px">{{formData.warehouse_title}}</FormItem>
-            <FormItem label='出库类型:' style="width:290px">{{formData.type_id==1?'采购':'库存'}}</FormItem>
+            <FormItem label='出库类型:' style="width:290px">{{formData.type_title}}</FormItem>
             <FormItem label='单据日期:' style="width:290px">{{this.func.replaceDateNoHMS(formData.order_time)}}</FormItem>
             <FormItem label='制单人:' style="width:290px">{{formData.user_name}}</FormItem>
             <FormItem label='订单创建时间:' style="width:290px">{{this.func.replaceDateNoHMS(formData.crt_time)}}</FormItem>

+ 4 - 5
src/views/PurchasingManage/OutstockOrder/edit.vue

@@ -226,7 +226,7 @@
     </Form>
     <Table :data='referData' :columns='referColumns' border @on-selection-change='referSelect' show-summary :summary-method="Summary">
       <template slot-scope="{row,index}" slot="out_num">
-        <Input v-model="referData[index].out_num" @on-focus='InputFocus(row,index)' @on-blur='InputBlur(row,index)' @on-change='InputChange(
+        <Input v-model="referData[index].out_num" :disabled='row._disabled' @on-focus='InputFocus(row,index)' @on-blur='InputBlur(row,index)' @on-change='InputChange(
           $event,row,index)'></Input>
       </template>
     </Table>
@@ -1127,7 +1127,6 @@ currentRow.total = (currentRow.num*currentRow.price*1).toFixed(2)
         this.$forceUpdate();
     },
     sureRefer(){
-      console.log(this.referSelectData);
       let referIds=[];
       this.copyTableData.forEach(v=>{
         referIds.push(v.refer_id)
@@ -1152,7 +1151,6 @@ currentRow.total = (currentRow.num*currentRow.price*1).toFixed(2)
             v.reference_order_no = v.order_in_no;
       })
      this.tableData.pop();
-     console.log(this.chooseRow)
         for (let i = 0; i < this.tableData.length; i++) {
           const element = this.tableData[i];
           if(element.material_detail_id==this.chooseRow.material_detail_id){
@@ -1170,9 +1168,10 @@ currentRow.total = (currentRow.num*currentRow.price*1).toFixed(2)
                  }
         })
         this.PurchaseOrder = [];
+        console.log(this.tableData);
         this.tableData.forEach(v=>{
-          if(this.PurchaseOrder.indexOf(v.order_in_no)<0){
-                this.PurchaseOrder.push(v.order_in_no);
+          if(this.PurchaseOrder.indexOf(v.reference_order_no)<0){
+                this.PurchaseOrder.push(v.reference_order_no);
           }
         })
         this.tableData.push({title:'选择物料'});

+ 1 - 2
src/views/PurchasingManage/OutstockOrder/list.vue

@@ -266,8 +266,7 @@ export default {
           minWidth: 120,
           render: (h, params) => {
             const { row } = params;
-            const text = row.type_id == 1 ? "采购" : "库存";
-            return h("span", {}, text);
+            return h("span", {}, row.type_title);
           },
         },
         {

+ 5 - 2
src/views/PurchasingManage/redFontInstockOrder/detail.vue

@@ -18,7 +18,7 @@
             <FormItem label='红字采购入库单号:' style="width:290px">{{formData.order_red_no}}</FormItem>
             <FormItem label='供应商名称:' style="width:290px">{{formData.supply_title}}</FormItem>
             <FormItem label='仓库:' style="width:290px">{{formData.warehouse_title}}</FormItem>
-            <FormItem label='入库类型:' style="width:290px">{{formData.type_id==1?'采购':'库存'}}</FormItem>
+            <FormItem label='入库类型:' style="width:290px">{{formData.type_title}}</FormItem>
             <FormItem label='单据日期:' style="width:290px">{{this.func.replaceDateNoHMS(formData.order_time)}}</FormItem>
             <FormItem label='制单人:' style="width:290px">{{formData.user_name}}</FormItem>
             <FormItem label='订单创建时间:' style="width:290px">{{this.func.replaceDateNoHMS(formData.crt_time)}}</FormItem>
@@ -72,7 +72,10 @@ export default {
             checkTableData:[],
               checkTableColumns:[{title:'项目编号',align:'center',minWidth:120,key:'project_code'},
       {title:'项目名称',align:'center',minWidth:120,key:'project_title'},
-      {title:'数量',align:'center',minWidth:120,key:'num'}],
+      {title:'数量',align:'center',minWidth:120,key:'num',render:(h,params)=>{
+          const {row} = params;
+          return h('span',{style:{color:'red'}},row.num)
+      }}],
       checkMaterialTitle:'',
       checkTotal:0,
       CheckPageIndex:1,

+ 1 - 2
src/views/PurchasingManage/redFontInstockOrder/list.vue

@@ -212,8 +212,7 @@ export default {
           title: '入库类型', key: 'type', align: 'center', minWidth: 120,
           render: (h, params) => {
             const { row } = params
-            const text = row.type == 1 ? '采购' : '库存'
-            return h('span', {}, text)
+            return h('span', {}, row.type_title)
           }
         },
         {

+ 1 - 1
src/views/PurchasingManage/redFontOutstockOrder/detail.vue

@@ -18,7 +18,7 @@
             <FormItem label='红字领料出库单号:' style="width:290px">{{formData.order_red_no}}</FormItem>
             <FormItem label='项目名称:' style="width:290px">{{formData.project_title}}</FormItem>
             <FormItem label='仓库:' style="width:290px">{{formData.warehouse_title}}</FormItem>
-            <FormItem label='出库类型:' style="width:290px">{{formData.type_id==1?'采购':'库存'}}</FormItem>
+            <FormItem label='出库类型:' style="width:290px">{{formData.type_title}}</FormItem>
             <FormItem label='单据日期:' style="width:290px">{{this.func.replaceDateNoHMS(formData.order_time)}}</FormItem>
             <FormItem label='制单人:' style="width:290px">{{formData.user_name}}</FormItem>
             <FormItem label='订单创建时间:' style="width:290px">{{this.func.replaceDateNoHMS(formData.crt_time)}}</FormItem>

+ 3 - 3
src/views/PurchasingManage/redFontOutstockOrder/edit.vue

@@ -647,7 +647,7 @@ export default {
             //   })
         //   }},
          {
-          title: "额", key: "total", align: "center", minWidth: 120,
+          title: "额", key: "total", align: "center", minWidth: 120,
            render: (h, params) => {
             const { row, index } = params;
             const currentRow = JSON.parse(
@@ -1204,7 +1204,7 @@ export default {
         this.confirmDelete({
         content: "确认删除么?",
         then: () => {
-    if(!row.is_add){
+    
          if(!row.is_add){
            this.delData.push(row)
          }
@@ -1219,7 +1219,7 @@ export default {
               }
         
           })
-        }}})
+        }})
         //  this.selectedTableData = [];
           break;
       }

+ 1 - 2
src/views/PurchasingManage/redFontOutstockOrder/list.vue

@@ -212,8 +212,7 @@ export default {
           title: '出库类型', key: 'type', align: 'center', minWidth: 120,
           render: (h, params) => {
             const { row } = params
-            const text = row.type_id == 1 ? '采购' : '库存'
-            return h('span', {}, text)
+            return h('span', {}, row.type_title)
           }
         },
         {

+ 14 - 7
src/views/Warehouse/FirstInventory/detail.vue

@@ -29,7 +29,7 @@
           </Select>
         </FormItem>
         <FormItem>
-          <Button @click="showModal=true"
+          <Button @click="selectMaterial"
                   type="primary"
                   size="small"
                   style="margin-left:10px;">选择物料</Button>
@@ -38,6 +38,7 @@
     </div>
     <div class="warehouseList_content">
       <Table :columns="tableColums"
+             max-height = '650'
              :data="tableData"
              border>
         <template slot='set'
@@ -58,7 +59,7 @@
         <div class="modal_content_left">
           <Tree :data="modalData.treeData"
                 children-key='list'
-                style="width:100%;"
+               
                 @on-select-change="handleTreeSlect"
                 class="demo-tree-render"></Tree>
         </div>
@@ -66,6 +67,7 @@
           <div class="modal_content_center_top">
             <div><span>物料名称:</span>
               <Input type="text"
+              clearable
                      v-model="modalData.title"
                      placeholder="请输入物料名称" />
             </div>
@@ -283,10 +285,10 @@ export default {
       modal_page_size: 10,
       modal_total: 0,
       modalTableColumns: [
-        { title: '全选', type: 'selection', align: 'center', resizable:true,width: 150 },
-        { title: '物料名称', key: 'title', align: 'center', resizable:true,width: 500 },
-        { title: '物料规格', key: 'model', align: 'center', resizable:true,width: 500 },
-        { title: '计量单位', key: 'unit', align: 'center', minWidth: 300 },
+        { title: '全选', type: 'selection', align: 'center', resizable:true,width: 100 },
+        { title: '物料名称', key: 'title', align: 'center', resizable:true,width: 250 },
+        { title: '物料规格', key: 'model', align: 'center', resizable:true,width: 250 },
+        { title: '计量单位', key: 'unit', align: 'center', minWidth: 200 },
       ],
       selectedColumns: [
         { title: '物料名称', key: 'title', align: 'center', minWidth: 110 },
@@ -315,6 +317,11 @@ export default {
     this.initModal()
   },
   methods: {
+    selectMaterial(){
+          this.showModal = true;
+          this.modalData.selectedData = [];
+          this.modalData.tableData = JSON.parse(JSON.stringify(this.modalData.tableData))
+    },
     //审核、弃审  2编辑
     handleSet (row, index, type) {
       switch (type) {
@@ -520,7 +527,7 @@ export default {
   .modal_content_left {
   }
   .modal_content_center {
-    width: 80%;
+    width: 60%;
     border-left: 1px solid #666;
     border-right: 1px solid #666;
     padding: 0 20px;

+ 1 - 1
src/views/Warehouse/FirstInventory/list.vue

@@ -111,7 +111,7 @@
     <div class="warehouseList_content">
       <Table :columns="tableColums"
              :data="tableData"
-             :max-height="400"
+             :max-height="550"
              @on-selection-change="handleSelectionChange"
              border>
         <template slot='set'

+ 61 - 46
src/views/Warehouse/Warehouse/inoutTotalList.vue

@@ -24,8 +24,8 @@
                   style="width:200px">
             <Option v-for="item in warehouseList"
                     :key="item.id"
-                    :value="item.id"
-                    :label="item.title">
+                    :value="item.type_id"
+                    :label="item.type_title">
             </Option>
           </Select>
         </FormItem>
@@ -55,15 +55,14 @@
             </Option>
           </Select>
         </FormItem>
-        <FormItem label='规格型号'>
-          <Select>
-            <Option/>
-          </Select>
+          <FormItem label='规格型号'>
+              <Select v-model="searchData.material_detail_id" filterable multiple  style="width:200px">
+                <Option v-for="(item,index) in material_list" :key="index" :value="item.material_detail_id" :label='`${item.long?item.long:0}*${item.width?item.width:0}*${item.high?item.high:0}`'/>
+              </Select>
         </FormItem>
         <FormItem label="显示零结存">
           <Select v-model="searchData.state"
                   clearable
-                  multiple
                   placeholder='请选择'
                   filterable
                   style="width:200px">
@@ -89,7 +88,8 @@
     <div class="warehouseList_content">
       <Table :columns="tableColums"
              :data="tableData"
-             border>
+             border
+             :span-method="handleSpan">
       </Table>
       <div class="pageSlotStyle">
         <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
@@ -114,9 +114,11 @@ export default {
   data () {
     // 这里存放数据
     return {
+      material_list:[],
       searchData: {
         warehouse_id: null,
         material_type_id: null,
+        material_detail_id:[],
         material_id: null,
         state: null,
         date: null,
@@ -129,51 +131,29 @@ export default {
           title: '规格型号', align: 'center', key: 'renovation_type', minWidth: 180,
           render: (h, params) => {
             const { row } = params
-            let text = `L${row.long}*W${row.width}*H${row.high}`
-            return h('span', {}, text)
+            let text = `L${row.long?row.long:0}*W${row.width?row.width:0}*H${row.high?row.high:0}`
+            return  row.warehouse_title=='合计'?h('span', {}, ''):h('span',{},text)
           }
         },
         { title: '计量单位', align: 'center', key: 'unit', minWidth: 80 },
-        { title: '期初数量', align: 'center', key: 'before_num', minWidth: 100 },
+        { title: '期初数量', align: 'center', key: 'begin_num', minWidth: 100 },
         {
-          title: '期初单价', align: 'center', key: 'before_price', minWidth: 100,
-          render: (h, params) => {
-            const { row } = params
-            let text = (Number(row.before_total_price) / Number(row.before_num)).toFixed(6)
-            return h('span', {}, text)
-          }
-        },
-        { title: '期初金额', align: 'center', key: 'before_total_price', minWidth: 100 },
-        { title: '收入数量', align: 'center', key: 'in_num', minWidth: 100 },
+          title: '期初单价', align: 'center', key: 'begin_price', minWidth: 100 },
+        { title: '期初金额', align: 'center', key: 'begin_total_price', minWidth: 100 },
+        { title: '收入数量', align: 'center', key: 'order_in_num', minWidth: 100 },
         {
-          title: '收入单价', align: 'center', key: 'in_price', minWidth: 100,
-          render: (h, params) => {
-            const { row } = params
-            let text = (Number(row.in_total_price) / Number(row.in_num)).toFixed(6)
-            return h('span', {}, text)
-          }
-        },
-        { title: '收入金额', align: 'center', key: 'in_total_price', minWidth: 100 },
-        { title: '发出数量', align: 'center', key: 'out_num', minWidth: 100 },
+          title: '收入单价', align: 'center', key: 'order_in_price', minWidth: 100,},
+        { title: '收入金额', align: 'center', key: 'order_in_total_price', minWidth: 100 },
+        { title: '发出数量', align: 'center', key: 'order_out_num', minWidth: 100 },
         {
-          title: '发出单价', align: 'center', key: 'out_price', minWidth: 100,
-          render: (h, params) => {
-            const { row } = params
-            let text = (Number(row.out_total_price) / Number(row.out_num)).toFixed(6)
-            return h('span', {}, text)
-          }
+          title: '发出单价', align: 'center', key: 'order_out_price', minWidth: 100,
         },
-        { title: '发出金额', align: 'center', key: 'out_total_price', minWidth: 100 },
-        { title: '结存数量', align: 'center', key: 'after_num', minWidth: 100 },
+        { title: '发出金额', align: 'center', key: 'order_out_total_price', minWidth: 100 },
+        { title: '结存数量', align: 'center', key: 'order_finish_num', minWidth: 100 },
         {
-          title: '结存单价', align: 'center', key: 'after_price', minWidth: 100,
-          render: (h, params) => {
-            const { row } = params
-            let text = (Number(row.after_total_price) / Number(row.after_num)).toFixed(6)
-            return h('span', {}, text)
-          }
+          title: '结存单价', align: 'center', key: 'order_finish_price', minWidth: 100,
         },
-        { title: '结存金额', align: 'center', key: 'after_total_price', minWidth: 100 },
+        { title: '结存金额', align: 'center', key: 'order_finish_total_price', minWidth: 100 },
         // {
         //   title: '单价', align: 'center', key: '', minWidth: 100,
         //   render: (h, params) => {
@@ -227,9 +207,39 @@ export default {
     this.axios('/api/material').then(res => { this.materialNameList = res.data.data })
   },
   methods: {
+    handleSpan({ row, column, rowIndex, columnIndex }){
+    
+          if(row.warehouse_title == '合计'&&column.key == 'warehouse_title'){
+            return {
+                        rowspan: 1,
+                        colspan: 5
+                    };
+          }else if(row.warehouse_title == '合计'&&column.key == 'material_type_title'){
+                return{
+                  rowspan:0,
+                  colspan:0
+                }
+          }else if(row.warehouse_title == '合计'&&column.key == 'material_title'){
+                 return{
+                  rowspan:0,
+                  colspan:0
+                }
+          }else if(row.warehouse_title == '合计'&&column.key == 'renovation_type'){
+                     return{
+                  rowspan:0,
+                  colspan:0
+                }
+          }else if(row.warehouse_title == '合计'&&column.key == 'unit'){
+              return{
+                  rowspan:0,
+                  colspan:0
+                }
+          }
+    },
     handleSearchData () {
       let obj = {
         warehouse_id: this.searchData.warehouse_id ? this.searchData.warehouse_id.join(',') : null,
+        material_detail_id:this.searchData.material_detail_id,
         material_type_id: this.searchData.material_type_id ? this.searchData.material_type_id.join(',') : null,
         material_id: this.searchData.material_id ? this.searchData.material_id.join(',') : null,
         start_time: this.searchData.date[0] ? this.func.replaceDateNoHMS(this.searchData.date[0]) : null,
@@ -248,9 +258,14 @@ export default {
     },
     getData (row) {
       this.loading = true;
-      this.axios('/api/warehouse_stock_out_in_list', { params: row }).then(res => {
+      this.axios.post('/api/warehouse_stock_out_in_list', { ...row }).then(res => {
         this.loading = false;
-        this.tableData = res.data;
+        this.material_list = res.data.material_list;
+        this.tableData = res.data.data;
+        this.tableData.push({
+        ...res.data.total_list,
+warehouse_title: "合计"
+        })
         this.total = res.data.total;
       })
     },

+ 39 - 74
src/views/Warehouse/Warehouse/stockingList.vue

@@ -67,12 +67,12 @@
         </FormItem>
          <FormItem label='产品名称' v-show="down_show">
           <Select filterable multiple v-model="down_searchData.product_id">
-            <Option v-for="item in product_list" :key="item.id" :value="item.id" :label="item.title"/>
+            <Option v-for="(item,index) in product_list" :key="index" :value="item.id" :label="item.title"/>
           </Select>
         </FormItem>
         <FormItem label='房间号:' v-show="down_show">
           <Select filterable multiple v-model="down_searchData.house_id" >
-            <Option v-for="item in house_list" :key="item.house_id" :value="item.house_id" :label="item.label"/>
+            <Option v-for="(item,index) in house_list" :key="index" :value="item.house_id" :label="item.label"/>
           </Select>
         </FormItem>
         <FormItem v-show="up_show">
@@ -89,8 +89,9 @@
       <Table :columns="tableColumns"
              :data="tableData"
              border
-             :summary-method="handleSummary"
-             show-summary>
+             max-height='550'
+           
+            >
       </Table>
       <div class="pageSlotStyle">
         <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
@@ -107,8 +108,9 @@
       <Table :columns="footTableColumns"
              :data="footTableData"
              border
-             :summary-method="handleSummary"
-             show-summary>
+             max-height='550'
+           
+             >
       </Table>
       <div class="pageSlotStyle">
         <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
@@ -161,26 +163,23 @@ export default {
           title: '规格型号', align: 'center', key: 'renovation_type', minWidth: 200,
           render: (h, params) => {
             const { row } = params
-            let text = `L${row.long}*W${row.width}*H${row.high}`
-            return h('span', {}, text)
+            let text = `L${row.long?row.long:0}*W${row.width?row.width:0}*H${row.high?row.high:0}`
+            return row.warehouse_title=='合计'?h('span',{},''):h('span', {}, text)
           }
         },
         { title: '计量单位', align: 'center', key: 'unit', minWidth: 120 },
         { title: '数量', align: 'center', key: 'num', minWidth: 100 },
         {
-          title: '单价(元)', align: 'center', key: '', minWidth: 100,
-          render: (h, params) => {
-            const { row } = params
-            let text = (Number(row.price) / Number(row.num)).toFixed(6)
-            return h('span', {}, text)
+          title: '单价(元)', align: 'center', key: 'price', minWidth: 100,render:(h,params)=>{
+            const {row} = params;
+            return row.warehouse_title=='合计'?h('span',{},''):h('span',{},(row.price*1).toFixed(2))
           }
         },
         {
           title: '金额', align: 'center', key: 'total_price', minWidth: 100,
           render: (h, params) => {
             const { row } = params
-            let text = (row.price*1*row.num).toFixed(2)
-            return h('span', {}, text)
+            return h('span', {}, row.total_price)
           }
         },
       ],
@@ -240,7 +239,6 @@ export default {
   },
   methods: {
     material_select_name(e){
-      console.log(e);
       if(e.length!=0){
       let obj = e.toString();
       this.up_searchData.material_detail_id = [];
@@ -288,17 +286,29 @@ export default {
      
     },
     standingCropData(){
-          this.axios.post('/api/warehouse_stock_material_list').then(res=>{
+          this.axios.post('/api/warehouse_stock_material_list',{page_size:this.page_size,page_index:this.page_index}).then(res=>{
                 this.tableData = res.data.data;
-                this.total = res.data.total;
+                this.tableData.forEach(v=>{
+                  v.total_price = (v.num*1*v.price).toFixed(2);
+                })
+                     let obj = {};
+                  obj.warehouse_title = '合计';
+                  obj.num = res.data.total_list.num;
+                  obj.total_price = (res.data.total_list.total_price).toFixed(2);
+                  this.tableData.push(obj);
+                  this.total = res.data.total;
           })
     },
     packData(){
-     this.axios.post('/api/warehouse_stock_pack_list').then(res=>{
+     this.axios.post('/api/warehouse_stock_pack_list',{page_size:this.down_page_size,page_index:this.down_page_index}).then(res=>{
              this.footTableData = res.data.data;
+             let obj = {};
+             obj.warehouse_title = '合计';
+             obj.num = res.data.total_num;
+         this.footTableData.push(obj)
                          this.down_total = res.data.total;
                          res.data.order_list.forEach(v=>{
-                           v.value = v.project_title;
+                           v.value = v.id;
                            v.label = v.project_title;
                          })
                          this.project_title_list = res.data.order_list;
@@ -370,69 +380,24 @@ export default {
         this.down_searchData.house_id=[]
      }
     },
-
-     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;
-            },
          up_search(){
                this.axios.post('/api/warehouse_stock_material_list',{...this.up_searchData,warehouse_id:this.warehouse_id,page_size:this.page_size,page_index:this.page_index}).then(res=>{
                     this.tableData = res.data.data;
+                        let obj = {};
+                  obj.warehouse_title = '合计';
+                  obj.num = res.data.total_list.num;
+                  obj.total_price = (res.data.total_list.total_price).toFixed(2);
+                  this.tableData.push(obj);
                     this.total = res.data.total;
                })
          },
          down_search(){
                        this.axios.post('/api/warehouse_stock_pack_list',{...this.down_searchData,warehouse_id:this.warehouse_id,page_index:this.down_page_index,page_size:this.down_page_size}).then(res=>{
                          this.footTableData = res.data.data;
+                             let obj = {};
+             obj.warehouse_title = '合计';
+             obj.num = res.data.total_num;
+         this.footTableData.push(obj)
                          this.down_total = res.data.total;
                        })
          },

+ 29 - 14
src/views/Warehouse/Warehouse/stockingTable.vue

@@ -97,25 +97,35 @@
                           title="单据类型"
                           min-width="80">
           <template #default="{ row }">
-            {{(row.type==1||row.type==3?'入库单':'出库单')}}
+            <span>{{row.type_title}}</span>
           </template>
         </vxe-table-column>
         <vxe-table-column field="in_num"
                           min-width="90"
-                          title="入库数量"></vxe-table-column>
+                          title="入库数量">
+                          <template #default="{ row }">
+                           <span :style="row.type==2||row.type==4?{color:'red'}:{}">{{row.in_num}}</span>
+                          </template>
+                          </vxe-table-column>
         <vxe-table-column field="in_price"
                           min-width="105"
                           title="入库单价">
-          <!-- <template #default="{ row }">
-            {{(row.in_total_price&&row.in_total_price!=0)&&(row.in_num!=0?1 * row.in_total_price / row.in_num:0)}}
-          </template> -->
+            
         </vxe-table-column>
         <vxe-table-column field="in_total_price"
                           min-width="100"
-                          title="入库金额"></vxe-table-column>
+                          title="入库金额">
+                           <template #default="{ row }">
+                           <span :style="row.type==2||row.type==4?{color:'red'}:{}">{{row.in_total_price}}</span>
+                          </template>
+                    </vxe-table-column>
         <vxe-table-column field="out_num"
                           min-width="100"
-                          title="出库数量"></vxe-table-column>
+                          title="出库数量">
+                            <template #default="{ row }">
+                           <span :style="row.type==2||row.type==4?{color:'red'}:{}">{{row.out_num}}</span>
+                          </template>
+                          </vxe-table-column>
         <vxe-table-column field="out_price"
                           min-width="105"
                           title="出库单价">
@@ -125,7 +135,11 @@
         </vxe-table-column>
         <vxe-table-column field="out_total_price"
                           min-width="105"
-                          title="出库金额"></vxe-table-column>
+                          title="出库金额">
+                            <template #default="{ row }">
+                           <span :style="row.type==2||row.type==4?{color:'red'}:{}">{{row.out_total_price}}</span>
+                          </template>
+                          </vxe-table-column>
         <vxe-table-column field="before_num"
                           min-width="100"
                           title="结存数量"></vxe-table-column>
@@ -393,12 +407,12 @@ export default {
            element.before_num = element.remain_num;
            element.before_total_price = (element.remain_price*1).toFixed(2);
            element.before_price = ((element.remain_price*1)/(element.remain_num*1)).toFixed(2);
-           if(element.type==1||element.type==3){
+           if(element.type==1||element.type==4){
              element.in_num = element.num;
              element.in_price = (element.price*1).toFixed(2);
              element.in_total_price = (element.num*1*element.price).toFixed(2);
            }
-           if(element.type == 2||element.type == 4){
+           if(element.type == 2||element.type == 3){
              element.out_num = element.num;
              element.out_price = (element.price).toFixed(2);
              element.out_total_price =  (element.num*1*element.price).toFixed(2);
@@ -406,11 +420,12 @@ export default {
            if(element.type==-1){
              let obj = JSON.parse(JSON.stringify(element));
              element.in_num = obj.in_num;
-             element.in_price = obj.in_price.toFixed(2);
-             element.in_total_price = (obj.in_num*1*obj.in_price).toFixed(2);
+                element.in_total_price = (element.in_total_price).toFixed(2);
+             element.in_price = (obj.in_total_price*1/obj.in_num*1).toFixed(2);
                element.out_num = obj.out_num;
-             element.out_price = obj.out_price.toFixed(2);
-             element.out_total_price = (obj.out_num*1*obj.out_price).toFixed(2);
+                  element.out_total_price = (obj.out_total_price*1).toFixed(2);
+
+             element.out_price = ((obj.out_total_price*1)/(obj.out_num*1)).toFixed(2);
               element.before_num = '';
            element.before_total_price = '';
            element.before_price = '';