Ver código fonte

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

* 'hw' of http://121.41.102.225:8099/Nidong/jiufang:
  34
  70

# Conflicts:
#	src/views/OrderMannage/BusinessOrderlist/edit.vue
Andy 3 anos atrás
pai
commit
569a717c58

+ 1 - 0
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -4320,6 +4320,7 @@ export default {
             select_all_id: $event.value,
             product_id: arr[0] * 1,
             type_name: "", //展示用产品名称
+            position: row.position, //位置
             over_price: "", //超标单价
             unit_price: "", //单价
             ext_price: "", //附加金额

+ 393 - 80
src/views/PurchasingManage/RequisitionOrder/edit.vue

@@ -1,9 +1,21 @@
 <template>
-  <div>
-    <Toptitle :title="$route.query.type == 1 ? '新增请购单' : '请购单详情'">
+  <div style="height:93%">
+    <Toptitle :title="$route.query.type == 1 ? '新增采购计划' : $route.query.type==2?'采购计划详情':$route.query.type==3?'编辑采购计划':'复制采购计划'">
       <slot name="titleButton">
+        <Button type="primary" ghost style="margin-right: 10px" v-if="$route.query.type==2"
+          >审批/弃审</Button
+        >
+         <Button type="primary" ghost style="margin-right: 10px" v-if="$route.query.type==2"
+          >打开</Button
+        >
+         <Button type="primary" ghost style="margin-right: 10px" v-if="$route.query.type==2"
+          >关闭</Button
+        >
+         <Button type="primary" ghost style="margin-right: 10px"
+          >栏目设置</Button
+        >
         <Button @click="goBack" type="primary" ghost style="margin-right: 10px"
-          >返回</Button
+          >取消</Button
         >
         <Button
           @click="postData"
@@ -11,33 +23,29 @@
           v-show="!isCheck"
           ghost
           style="margin-right: 10px"
-          >确定</Button
+          >保存</Button
         >
       </slot>
     </Toptitle>
+    
     <div class="content_topform">
-      <Form :label-width="90" :model="searchData">
-        <FormItem label="项目名称:">
+      <Form :label-width="100" :model="searchData" :rules="ruleValidate">
+
+        <FormItem label="计划单号:">
           <Input
             type="text"
             size="small"
             v-show="!isCheck"
-            v-model="searchData.residential_name"
+            disabled
             style="width: 200px; margin-top: 6px"
-            placeholder="项目名称"
+            placeholder="自动生成计划单号"
           >
-            <span
-              slot="append"
-              style="cursor: pointer"
-              @click="showProjectModal = true"
-              >选择</span
-            >
           </Input>
-          <span v-show="isCheck">{{ searchData.residential_name }}</span>
+          <span v-show="isCheck">{{ $route.query.plan_no }}</span>
         </FormItem>
-        <FormItem label="请购类型:">
+        <FormItem label="采购计划类型:" :label-width='120'>
           <Select
-            v-model="searchData.type_id"
+            v-model="searchData.plan_type"
             size="small"
             clearable
             v-show="!isCheck"
@@ -56,11 +64,11 @@
           <span
             v-for="item in purchaseTypeList"
             :key="item.id"
-            v-show="item.id == searchData.type_id && isCheck"
+            v-show="item.id == searchData.plan_type && isCheck"
             >{{ item.title }}</span
           >
         </FormItem>
-        <FormItem label="单据号:">
+        <!-- <FormItem label="单据号:">
           <Input
             type="text"
             size="small"
@@ -72,19 +80,19 @@
           >
           </Input>
           <span v-show="isCheck">{{ searchData.purchase_order_apply_no }}</span>
-        </FormItem>
-        <FormItem label="制单时间:">
+        </FormItem> -->
+        <FormItem label="单据日期:" :prop="!isCheck?'time':''" :label-width='120'>
           <DatePicker
             type="date"
             v-show="!isCheck"
             size="small"
             style="width: 200px"
             placeholder="年/月/日"
-            v-model="searchData.time"
+            v-model="searchData.order_time"
           ></DatePicker>
-          <span v-show="isCheck">{{ func.replaceDate(searchData.time) }}</span>
+          <span v-show="isCheck">{{ searchData.order_time?func.replaceDate(searchData.order_time).split(' ')[0]:'' }}</span>
         </FormItem>
-        <FormItem label="备注">
+        <FormItem label="备注:">
           <Input
             type="textarea"
             v-show="!isCheck"
@@ -100,48 +108,109 @@
     </div>
     <div class="content_table">
       <div class="content_table_btn">
-        <span>请购清单</span>
-        <Button
+        <h4>计划清单</h4>
+        <!-- <Button
           @click="showModal = true"
           type="primary"
           v-show="!isCheck"
           size="small"
           style="margin-left: 10px"
           >选择物料</Button
-        >
+        > -->
+         <Dropdown trigger="click" style="margin-left: 20px" @on-click='DropDownSort' v-if="$route.query.type!=2">
+        <a href="javascript:void(0)">
+            批量修改
+            <Icon type="ios-arrow-down"></Icon>
+        </a>
+        <DropdownMenu slot="list" >
+            <DropdownItem :name='1'>项目信息</DropdownItem>
+            <DropdownItem :name='2'>数量</DropdownItem>
+            <DropdownItem :name='3'>预计到货时间</DropdownItem>
+            <DropdownItem :name='4'>建议供应商</DropdownItem>
+        </DropdownMenu>
+    </Dropdown>
       </div>
-      <Table :columns="tableColumns" border :data="tableData">
+      <Table :columns="tableColumns" border :data="tableData" :max-height='500' show-summary :summary-method="handleSummary">
         <template slot="materiel_specs" slot-scope="{ row }">
-         
-            <div>
+            <span v-if="row.material_title == '选择物料'"></span>
+            <div v-else>
               {{ row.long ? row.long : 0 }}*{{ row.width ? row.width : 0 }}*{{
                 row.high ? row.high : 0
               }}
         </div>
         </template>
-        <template slot="materiel_sort" slot-scope="{ index }">
-            <Input
+        <template slot="materiel_sort" slot-scope="{ row,index }">
+           <span v-if="row.material_title == '选择物料'"></span>
+          <div v-else>
+            <!-- <Input
               type="text"
               v-show="!isCheck"
+              
               size="small"
               v-model="tableData[index].type_title"
               placeholder="数量"
             >
-            </Input>
-            <span v-show="isCheck">{{ tableData[index].type_title }}</span>
+            </Input> -->
+            <span >{{ tableData[index].material_type }}</span></div>
         </template>
-        <template slot="materiel_name" slot-scope="{ index }">
-            <Input
-              type="text"
+        <template slot="material_title" slot-scope="{ index }">
+            <span
+              
               v-show="!isCheck"
-              size="small"
-              v-model="tableData[index].title"
-              placeholder="数量"
+            
+             style="cursor: pointer;color:#2d8cf0"
+             @click="showModal = true"
+
             >
-            </Input>
+            {{tableData[index].material_title}}
+            </span>
             <span v-show="isCheck">{{ tableData[index].title }}</span>
         </template>
+        <template slot="project_code" slot-scope="{ row,index }">
+          <span v-if="row.material_title == '选择物料'"></span>
+          <div v-else>
+           <Select
+              v-model="tableData[index].project_code"
+              size="small"
+              clearable
+              transfer
+              v-show="!isCheck"
+              filterable
+              label-in-value
+            >
+              <Option
+                v-for="sitem in demo"
+                :key="sitem.id"
+                :label="sitem.label"
+                :value="sitem.value"
+              >
+              </Option>
+            </Select></div>
+        </template>
+        <template slot="project_title" slot-scope="{ row,index }">
+           <span v-if="row.material_title == '选择物料'"></span>
+          <div v-else>
+           <Select
+              v-model="tableData[index].project_title"
+              size="small"
+              clearable
+              transfer
+              v-show="!isCheck"
+              filterable
+              label-in-value
+            >
+              <Option
+                v-for="sitem in demo"
+                :key="sitem.id"
+                :label="sitem.label"
+                :value="sitem.value"
+              >
+              </Option>
+            </Select></div>
+        </template>
         <template slot="numberSet" slot-scope="{row , index }">
+           <span v-if="row.material_title == '选择物料'"></span>
+           <div v-else>
            <Tooltip
             placement="left"
             @on-popper-show="handleToolShow(index, row)"
@@ -154,17 +223,20 @@
               </div>
             </div>
             <Input
-              type="text"
               v-show="!isCheck"
+             
               size="small"
               v-model="tableData[index].num"
               placeholder="数量"
             >
             </Input>
+             <!-- @on-change="table_total_num_change" -->
             <span v-show="isCheck">{{ tableData[index].num }}</span>
-          </Tooltip>
+          </Tooltip></div>
         </template>
-        <template slot="arrive_timeSet" slot-scope="{ index }">
+        <template slot="arrive_timeSet" slot-scope="{ row,index }">
+           <span v-if="row.material_title == '选择物料'"></span>
+           <div v-else>
             <DatePicker
               type="date"
               size="small"
@@ -174,10 +246,12 @@
               v-model="tableData[index].time"
             ></DatePicker>
             <span v-show="isCheck">{{
-              func.replaceDate(tableData[index].time)
-            }}</span>
+              tableData[index].time?func.replaceDate(tableData[index].time).split(' ')[0]:''
+            }}</span></div>
         </template>
-        <template slot="supply_idSet" slot-scope="{ index }">
+        <template slot="supply_idSet" slot-scope="{ row,index }">
+           <span v-if="row.material_title == '选择物料'"></span>
+           <div v-else>
             <Select
               v-model="tableData[index].supply_id"
               size="small"
@@ -199,18 +273,27 @@
               v-for="item in suppliersList"
               :key="item.id"
               v-show="item.id == tableData[index].supply_id && isCheck"
-              >{{ item.title }}</span>
+              >{{ item.title }}</span></div>
         </template>
         <template slot="setSlot" slot-scope="{ row, index }">
+           <span v-if="row.material_title == '选择物料'"></span>
+           <div v-else>
+               <a
+              style="margin: 0 5px"
+              :disabled="row.state == 0"
+              v-show="!isCheck"
+              @click="handleSet(2, row, index)"
+              >复制</a>
             <a
               style="margin: 0 5px"
               :disabled="row.state == 0"
               v-show="!isCheck"
               @click="handleSet(1, row, index)"
-              >删除</a>
+              >删除</a></div>
         </template>
       </Table>
     </div>
+   
     <Modal
       v-model="showModal"
       title="选择物料"
@@ -349,6 +432,50 @@
         </div>
       </div>
     </Modal>
+    <Modal 
+    :width='400'
+    v-model="showTotal"
+    @on-ok='total_sure'
+    :title="total_type==1?'批量修改项目信息':total_type==2?'批量修改数量':total_type==3?'批量修改预计到货时间':'批量修改建议供应商'" >
+    <div style="text-align:center">
+      <div v-if="total_type==1">
+        <Form>
+          <FormItem>
+            <span>项目编码 : </span>
+        <Select v-model="total_project_info.code" style="width:200px">
+        <Option v-for="item in demo" :value="item.value" :key="item.value">{{ item.label }}</Option>
+    </Select>
+          </FormItem>
+             <FormItem>
+          <span>项目名称 : </span>
+        <Select v-model="total_project_info.name" style="width:200px">
+        <Option v-for="item in demo" :value="item.value" :key="item.value">{{ item.label }}</Option>
+    </Select>
+          </FormItem>
+    </Form>
+    </div>
+    <div v-if="total_type==2">
+      <span>数量 : </span><Input v-model="total_num" style="width:50%"/>
+    </div>
+    <div v-if="total_type == 3">
+      <span>预计到货时间 : </span>
+       <DatePicker
+              type="date"
+              size="small"
+              transfer
+              v-show="!isCheck"
+              placeholder="年/月/日"
+              v-model="total_time"
+            ></DatePicker>
+      </div>
+      <div v-if='total_type==4'>
+        <span>批量修改建议的供应商 : </span>
+         <Select v-model="total_supplier" style="width:200px">
+        <Option v-for="item in suppliersList" :value="item.id" :key="item.id"   :label="item.title"></Option>
+         </Select>
+      </div>
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -363,15 +490,38 @@ export default {
   // import引入的组件需要注入到对象中才能使用
   data() {
     // 这里存放数据
+    let vm = this
     return {
+      selectAll:false,
+        ruleValidate: {
+                    time: [
+                        { required: true,type: 'all', message: '单据日期不能为空',trigger: 'change'}
+                    ],},
+      table_total_num:0,
+      tableDataAlways:{material_title:'选择物料',_disabled:true},
+      total_num:'',
+      showTotal:false,
+      total_supplier:'',
+      total_time:"",
+      demo:[{label:'1',value:'2'}],
+      total_project_info:{
+        code:'',
+       name:''
+      },
+      total_type:'',
       searchData: {
-        type_id: "",
-        time: null,
+        plan_type: "",
+        order_time: null,
         remark: "",
       },
       purchaseTypeList: [],
       tableColumns: [
         {
+          align:'center',
+          width:100,
+          type:'selection'
+        },
+        {
           title: "物料分类",
           key: "type_title",
           align: "center",
@@ -383,7 +533,7 @@ export default {
           key: "title",
           align: "center",
           minWidth: 140,
-          slot: "materiel_name",
+          slot: "material_title",
         },
         {
           title: "物料规格",
@@ -399,8 +549,10 @@ export default {
           slot: "materiel_specs",
         },
         { title: "计量单位", key: "unit", align: "center", minWidth: 100 },
+         { title: "项目编码", key: "project_code", align: "center", minWidth: 120,slot: "project_code", },
+          { title: "项目名称", key: "project_title", align: "center", minWidth: 120 ,slot: "project_title",},
         {
-          title: "请购数量",
+          title: "数量",
           key: "num",
           align: "center",
           minWidth: 100,
@@ -425,7 +577,7 @@ export default {
           title: "操作",
           key: "code",
           align: "center",
-          minWidth: 80,
+          minWidth: 120,
           slot: "setSlot",
         },
       ],
@@ -597,7 +749,7 @@ export default {
         this.suppliersList = res.data.data;
       })
       .catch((err) => {});
-    // 获取项目列表
+    // //获取项目列表
     // this.axios({ method: 'get', url: '/api/order_index', }).then((res) => {
     //   this.modalProjectData.tableData = res.data.data
     //   this.modal_project_total = res.data.total
@@ -608,29 +760,165 @@ export default {
     });
     this.initModal();
     this.initProjectModal();
+    
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    if (this.$route.query.purchase_order_apply_no != "") {
+    if (this.$route.query.type != 1) {
       this.initData();
     }
+    if(this.$route.query.type!=2){
+      this.tableData.push(this.tableDataAlways);
+    }
+    if(this.$route.query.type == 2){
+      this.tableColumns.pop();
+      this.tableColumns.push({
+          title: "状态",
+          key: "model",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params
+            let text = `${row.long ? row.long : 0}*${row.width ? row.width : 0}*${row.high ? row.high : 0}`
+            return h('span', {
+            }, text)
+          },
+        })
+    }
   },
   methods: {
-    handleToolShow(index, row) {
-      if (this.warehouse) {
-        return
-      } else {
-        this.axios
-          .get("/api/warehouse_stock_number", {
-            params: {
-              material_id: row.material_id,
-              material_detail_id: row.material_detail_id,
-            },
+    renderChecked(h,{column,index}){
+   
+           return h("span",
+             [    h("Checkbox", {
+                      on:{
+                         'on-change':(val)=>{
+                           if(val){
+                             
+                              this.tableData.map(v=>{
+                             v.isSelect = true;
+                           })
+                           this.modalData.selectedData.forEach(m=>{
+                             m.isSelect = true;
+                           })
+                           this.$forceUpdate();
+                           console.log(this.tableData);
+                           }else{
+                               this.tableData.map(v=>{
+                             v.isSelect = false;
+                           })
+                           }
+                         },
+                      props:{
+                        value:this.selectAll
+                      }
+                      }
+                    }),
+                    h("span",'全选'),
+                  ]
+                  
+                  )
+        
+    },
+    total_sure(){
+      //1项目信息;2数量;3预计到货时间;4建议供应商
+      switch(this.total_type){
+        case 1:
+          break;
+        case 2:
+          this.tableData.map((v,index)=>{
+            v.num = JSON.parse(JSON.stringify(this.total_num));
+            if(index==(this.tableData.length-1)){
+              v.num = 0;
+            }
+            // this.$set(this.tableData.num,index,this.total_num)
           })
-          .then((res) => {
-              this.warehouse= res.data
-          });
+
+          // this.table_total_num = Number(this.total_num)*(this.tableData.length-1);
+          this.$forceUpdate();
+          break;
+        case 3:
+           this.tableData.map((v,index)=>{
+             v.time = this.func.replaceDate(parseInt(new Date(this.total_time).getTime() / 1000)) || "";
+             v.arrive_time = v.time;
+            //  this.tableData[index].time = this.total_time;
+           })
+           console.log(this.tableData);
+           this.$forceUpdate();
+          break;
+        case 4:
+          this.tableData.map(v=>{
+            v.supply_id = this.total_supplier;
+          })
+          break
       }
+    },
+    // table_total_num_change(val){
+    //       this.table_total_num = 0;
+    //        this.tableData.map(v=>{
+    //          if(v.material_title!=='选择物料'){
+    //                 this.table_total_num+=Number(v.num)
+    //          }
+    //        })
+    //        console.log(this.table_total_num)
+    //        this.$forceUpdate();
+    // },
+     handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    const key = column.key;
+                    if (index === 1) {
+                        sums[key] = {
+                            key,
+                            value: '合计'
+                        };
+                        return;
+                    }
+                    const values = data.map(item => Number(item[key]));
+                    if (key == 'num') {
+                        let v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        //  this.table_total_num = Number(JSON.parse(JSON.stringify(v)));
+                        sums[key] = {
+                            key,
+                            value:v
+                        };
+                    } else {
+                        sums[key] = {
+                            key,
+                            value: ''
+                        };
+                    }
+                });
+
+                return sums;
+            },
+    DropDownSort(val){
+      this.showTotal = true;
+      this.total_type = val;
+         console.log(val)
+    },
+    handleToolShow(index, row) {
+      // if (this.warehouse) {
+      //   return
+      // } else {
+      //   this.axios
+      //     .get("/api/warehouse_stock_number", {
+      //       params: {
+      //         material_id: row.material_id,
+      //         material_detail_id: row.material_detail_id,
+      //       },
+      //     })
+      //     .then((res) => {
+      //         this.warehouse= res.data
+      //     });
+      // }
       // this.warehouse.num = this.warehouseTotal[index].num;
       // this.warehouse.warehouseName = this.warehouseTotal[index].warehouseName
     },
@@ -639,17 +927,19 @@ export default {
         method: "get",
         url: "/api/purchase_apply_detail",
         params: {
-          purchase_order_apply_no: this.$route.query.purchase_order_apply_no,
+          plan_no: this.$route.query.plan_no,
         },
       })
         .then((res) => {
-          this.tableData = res.data.list;
+          // this.tableData = [{material_title:'选择物料'}] 
+          this.tableData.unshift(...res.data.children);
           this.searchData = res.data;
           this.searchData.time = this.func.replaceDate(res.data.crt_time);
           this.tableData.forEach((element) => {
             element.time = this.func.replaceDate(element.arrive_time);
             element.warehouse_list = []
           });
+          console.log(this.tableData);
           // for (let key in this.tableData) {
           //   this.axios({
           //     method: "get",
@@ -686,7 +976,12 @@ export default {
           .catch((err) => {});
     },
     handleSet(type, row, index) {
-      this.tableData.splice(index, 1);
+      if(type == 1){
+         this.tableData.splice(index, 1);
+      }else{
+        this.tableData.splice(index,0,row)
+      }
+     
     },
     handleSelection(selection, row) {
       this.modalData.selectedData.push(row);
@@ -701,6 +996,7 @@ export default {
     handleSelectionAll(selection) {
       this.modalData.selectedData =
         this.modalData.selectedData.concat(selection);
+        console.log(this.modalData.selectedData);
     },
     handleSelectionAllCancel() {
       this.modalData.tableData.forEach((element) => {
@@ -778,8 +1074,12 @@ export default {
     handleSelect() {
       this.modalData.selectedData.forEach((element) => {
         element.material_id = element.m_id;
-        element.type_title = element.m_title;
-        // element.arrive_time = this.func.replaceDate(element.arrive_time)
+        element.material_type = element.m_title;
+        element.material_title = element.title;
+        element.isSelect = false;
+        element.project_code =null;
+        element.project_title=null;
+        element.arrive_time = this.func.replaceDate(element.arrive_time)
         element.num = null;
         // element.arrive_time = null
         element.supply_id = null;
@@ -790,6 +1090,7 @@ export default {
         0,
         ...this.modalData.selectedData
       );
+      console.log(this.tableData)
       // console.log('this.modalData.selectedData :>> ', this.modalData.selectedData);
     },
     handleProjectSelect() {
@@ -800,14 +1101,20 @@ export default {
       this.$router.go(-1);
     },
     postData() {
-      this.searchData.crt_time =
-        parseInt(new Date(this.searchData.time).getTime() / 1000) || "";
+       let objData = [];
+        objData =JSON.parse(JSON.stringify(this.tableData)); 
+        objData.pop();
+      this.searchData.order_time =
+        parseInt(new Date(this.searchData.order_time).getTime() / 1000) || "";
+        objData.map(v=>{
+          v.arrive_time =  parseInt(new Date(v.time).getTime() / 1000) || "";
+        })
       this.tableData.forEach((element) => {
         element.arrive_time =
           parseInt(new Date(element.time).getTime() / 1000) || "";
       });
       let url;
-      if (this.$route.query.purchase_order_apply_no == "") {
+      if (this.$route.query.type == 1) {
         url = "/api/purchase_apply_add";
       } else {
         url = "/api/purchase_apply_edit";
@@ -817,12 +1124,15 @@ export default {
         url,
         data: {
           ...this.searchData,
-          list: this.tableData,
+          children:{...objData} 
         },
       })
         .then((res) => {
-          this.$Message.success(res.msg);
+          if(res.code == 200){
+              this.$Message.success(res.msg);
           this.goBack();
+          }
+        
         })
         .catch((err) => {});
     },
@@ -858,7 +1168,7 @@ export default {
 .content_table {
   .content_table_btn {
     display: flex;
-    justify-content: flex-start;
+    justify-content: space-between;
     align-items: center;
     padding-bottom: 20px;
   }
@@ -913,4 +1223,7 @@ export default {
 /deep/ .ivu-table-wrapper {
   overflow: visible;
 } //穿透iview
+/deep/ .ivu-checkbox-disabled{
+  display: none!important;
+}
 </style>

+ 116 - 48
src/views/PurchasingManage/RequisitionOrder/list.vue

@@ -6,15 +6,16 @@
                 type="primary"
                 ghost
                 style="margin-right:10px;">编码规则</Button> -->
-        <Button type="primary"
+        <!-- <Button type="primary"
                 @click="handleGoPage(1,'')"
-                style="margin-right:10px;">新增</Button>
+                style="margin-right:10px;">新增</Button> -->
       </slot>
     </Toptitle>
+    <div style="height:82%;overflow:auto">
     <div class="requisition_order_search">
-      <Form :label-width="90"
+      <Form :label-width="100"
             :model="searchData">
-        <FormItem label="单号:">
+        <FormItem label="计划单号:">
           <Input type="text"
                  size="small"
                  clearable
@@ -22,15 +23,21 @@
                  style="width: 150px"
                  placeholder="订单号" />
         </FormItem>
-        <FormItem label="项目名称:">
-          <Input type="text"
-                 size="small"
-                 clearable
-                 v-model="searchData.project_title"
-                 style="width: 150px"
-                 placeholder="项目名称" />
+        <FormItem label="项目编码:">
+           <Select v-model="searchData.project_title"
+                  size="small"
+                  clearable
+                  filterable
+                  label-in-value
+                  style="width: 150px">
+            <Option v-for="(sitem) in project_code"
+                    :key="sitem.id"
+                    :label="sitem.title"
+                    :value="sitem.id">
+            </Option>
+          </Select>
         </FormItem>
-        <FormItem label="请购类型:">
+        <FormItem label="项目名称:">
           <Select v-model="searchData.type_id"
                   size="small"
                   clearable
@@ -44,7 +51,32 @@
             </Option>
           </Select>
         </FormItem>
-        <FormItem label="提交人:">
+        <FormItem label="采购计划类型:" :label-width='110'>
+          <Select v-model="searchData.requisition_type"
+                  size="small"
+                  clearable
+                  filterable
+                  label-in-value
+                  style="width: 150px">
+            <Option v-for="(sitem) in requisition_type_List"
+                    :key="sitem.id"
+                    :label="sitem.title"
+                    :value="sitem.id">
+            </Option>
+          </Select>
+        </FormItem>
+         <FormItem label="订单状态:">
+          <Select v-model="searchData.lock"
+                  size="small"
+                  clearable
+                  style="width: 150px">
+            <Option label='正常'
+                    :value=0 />
+            <Option label='已关闭'
+                    :value=1 />
+          </Select>
+        </FormItem>
+        <FormItem label="制单人:">
           <Select v-model="searchData.user_id"
                   size="small"
                   clearable
@@ -71,37 +103,55 @@
                     :value=3 />
           </Select>
         </FormItem>
-        <FormItem label="订单状态:">
-          <Select v-model="searchData.lock"
+      <FormItem label="审批人:">
+          <Select v-model="searchData.user_id"
                   size="small"
                   clearable
                   style="width: 150px">
-            <Option label='正常'
-                    :value=0 />
-            <Option label='已关闭'
-                    :value=1 />
+            <Option v-for="(sitem) in userList"
+                    :key="sitem.id"
+                    :label="sitem.nickname"
+                    :value="sitem.id">
+            </Option>
           </Select>
         </FormItem>
-        <FormItem label="制单时间:">
+        <FormItem label="单据日期:" style="width:450px">
           <DatePicker type="date"
                       size="small"
                       style="width: 150px"
                       placeholder="年/月/日"
                       v-model="searchData.time[0]"></DatePicker>
+          ~
+          <DatePicker type="date"
+                      size="small"
+                      style="width: 150px"
+                      placeholder="年/月/日"
+                      v-model="searchData.time[1]"></DatePicker>
         </FormItem>
-        <FormItem label="~">
+       
+          <FormItem label="订单创建时间:" style="width:450px" :label-width='100'>
+          <DatePicker type="date"
+                      size="small"
+                      style="width: 150px"
+                      placeholder="年/月/日"
+                      v-model="searchData.time[0]"></DatePicker>
+        ~
           <DatePicker type="date"
                       size="small"
                       style="width: 150px"
                       placeholder="年/月/日"
                       v-model="searchData.time[1]"></DatePicker>
         </FormItem>
-        <FormItem>
-          <Button type="primary"
-                  size="small"
+       
+      </Form>
+      <Form style='display: flex;flex-direction: row-reverse;'>
+            <Button type="primary"
+                @click="handleGoPage(1,'')"
+                style="margin-right:10px;">新增</Button>
+         <Button type="primary"
                   @click="initData(searchData)"
                   style="margin-right:10px;">搜索</Button>
-        </FormItem>
+    
       </Form>
     </div>
     <div class="requisition_order_content">
@@ -113,6 +163,8 @@
                :data="tableData">
           <template slot="setSlot"
                     slot-scope="{row,index}">
+             <a style="margin:0 5px"
+               @click="handleSet(6,row,index)">复制</a>
             <a style="margin:0 5px"
                @click="handleSet(2,row,index)">详情</a>
             <a style="margin:0 5px"
@@ -123,10 +175,15 @@
                @click="handleSet(4,row,index)">删除</a>
             <a style="margin:0 5px"
                :disabled="row.state==1||row.state==2"
-               @click="handleSet(5,row,index)">提交</a>
+               @click="handleSet(5,row,index)">{{row.state==0?'审批':'弃审'}}</a>
           </template>
         </Table>
-        <div class="requisition_order_content_page">
+       
+      </div>
+    </div>
+    </div>
+
+     <div class="requisition_order_content_page">
           <Page :page-size-opts="[10, 20, 30, 40,100]"
                 @on-page-size-change='changeSize'
                 @on-change='changePage'
@@ -136,8 +193,6 @@
                 show-sizer
                 :page-size='pageSize' />
         </div>
-      </div>
-    </div>
   </div>
 </template>
 
@@ -155,7 +210,10 @@ export default {
   data () {
     // 这里存放数据
     return {
+      requisition_type_List:[],
+      project_code:[],
       searchData: {
+        requisition_type:'',
         order_no: '',
         project_title: '',
         type_id: '',
@@ -167,9 +225,10 @@ export default {
       },
       purchaseTypeList: [],
       tableColumns: [
-        { title: '订单号', key: 'purchase_order_apply_no', align: 'center', minWidth: 140 },
+        { title: '计划单号', key: 'plan_no', align: 'center', minWidth: 140 },
+        { title: '项目编码', key: 'residential_name', align: 'center', minWidth: 140 },
         { title: '项目名称', key: 'residential_name', align: 'center', minWidth: 140 },
-        { title: '请购类型', key: 'type_title', align: 'center', minWidth: 140 },
+        { title: '采购计划类型', key: 'type_title', align: 'center', minWidth: 140 },
         {
           title: '订单状态', key: 'lock', align: 'center', minWidth: 140,
           render: (h, params) => {
@@ -178,17 +237,24 @@ export default {
             return h('span', {}, text)
           }
         },
-        { title: '提交人', key: 'nickname', align: 'center', minWidth: 140 },
+        { title: '制单人', key: 'user_name', align: 'center', minWidth: 140 },
         {
           title: '审批状态', key: 'state', align: 'center', minWidth: 140,
           render: (h, params) => {
             const { row } = params
-            const text = row.state == 0 ? '未提交' : row.state == 1 ? '审核中' : row.state == 2 ? '通过' : '驳回'
+            const text = row.state == 0 ? '未审批' : '已审批'
             return h('span', {}, text)
           }
         },
         {
-          title: '制单日期', key: 'crt_time', align: 'center', minWidth: 180,
+          title: '单据日期', key: 'crt_time', align: 'center', minWidth: 180,
+          render: (h, params) => {
+            const { row } = params
+            return h('span', {}, row.order_time?this.func.replaceDate(row.order_time).split(' ')[0]:'')
+          }
+        },
+          {
+          title: '订单创建时间', key: 'crt_time', align: 'center', minWidth: 180,
           render: (h, params) => {
             const { row } = params
             return h('span', {}, this.func.replaceDate(row.crt_time))
@@ -239,12 +305,13 @@ export default {
       }).catch((err) => { });
     },
     handleSet (type, row, index) {
-      // 1新增 2详情 3编辑 4删除 5提交
+      // 1新增 2详情 3编辑 4删除 5提交 6复制
       switch (type) {
         case 1:
         case 2:
+        case 6:
         case 3:
-          this.handleGoPage(type, row.purchase_order_apply_no)
+          this.handleGoPage(type, row.plan_no)
           break;
         case 4:
           this.$Modal.confirm({
@@ -255,7 +322,7 @@ export default {
                 method: 'get',
                 url: '/api/purchase_apply_del',
                 params: {
-                  purchase_order_apply_no: row.purchase_order_apply_no
+                  plan_no: row.plan_no
                 }
               }).then((res) => {
                 this.$Message.success(res.msg)
@@ -267,16 +334,16 @@ export default {
           break;
         case 5:
           this.$Modal.confirm({
-            title: '确认提交?',
+            title: '确认审核?',
             // content: '此操作无法恢复,请确认!',
             onOk: () => {
               this.axios({
-                method: 'post',
-                url: '/api/purchase_apply_pull',
-                data: {
-                  purchase_order_apply_no: row.purchase_order_apply_no,
-                  lock: row.lock,
-                  state: row.state + 1,
+                method: 'get',
+                url: '/api/purchase_apply_check',
+                params: {
+                  plan_no: row.plan_no,
+                  // lock: row.lock,
+                  state: row.state,
                 }
               }).then((res) => {
                 this.$Message.success(res.msg)
@@ -288,12 +355,12 @@ export default {
           break;
       }
     },
-    handleGoPage (type, purchase_order_apply_no) {
+    handleGoPage (type, plan_no) {
       this.$router.push({
         path: '/cms/PurchasingManage/RequisitionOrder/edit',
         query: {
           type,
-          purchase_order_apply_no
+          plan_no
         }
       })
     },
@@ -341,10 +408,11 @@ export default {
     justify-content: flex-end;
     padding: 20px 0;
   }
-  .requisition_order_content_page {
+ 
+} 
+.requisition_order_content_page {
     display: flex;
     justify-content: center;
     padding-top: 20px;
   }
-}
 </style>

+ 2 - 2
src/views/leadMatch/MatchList/matchCheck.vue

@@ -354,8 +354,8 @@ export default {
       matchedSheetTableColumns: [
         { title: "序号", align: "center", type: "index", resizable: true,
                         width: 100 },
-        //  { title: "组合名称", align: "center", key:'compose_name', resizable: true,
-        //                 width: 100 },
+         { title: "组合名称", align: "center", key:'compose_name', resizable: true,
+                        width: 100 },
         { title: "区域名称", align: "center", key: "region",  resizable: true,
                         width: 160 },
         { title: "房号", align: "center", key: "house_number",  resizable: true,

+ 2 - 2
src/views/leadMatch/MatchList/matchPage.vue

@@ -816,7 +816,7 @@ export default {
           },
         },
         { title: "序号", align: "center", type: "index", minWidth: 60 },
-          // { title: "组合名称", align: "center", key: "compose_name", minWidth: 100 },
+          { title: "组合名称", align: "center", key: "compose_name", minWidth: 100 },
         { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },
         { title: "行号", align: "center", key: "line", minWidth: 70 },
         { title: "木皮1", align: "center", key: "skin1", minWidth: 60 },
@@ -866,7 +866,7 @@ export default {
       matchedSheetTableColumns: [
         // { title: "全选", align: "center", minWidth: 60, type: "selection" },
         { title: "序号", align: "center", type: "index", minWidth: 60 },
-        //  { title: "组合名称", align: "center", key:'compose_name', minWidth: 100 },
+         { title: "组合名称", align: "center", key:'compose_name', minWidth: 100 },
         { title: "区域名称", align: "center", key: "region", minWidth: 100 },
         { title: "房号", align: "center", key: "house_number", minWidth: 100 },
         { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },

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

@@ -119,8 +119,8 @@ export default {
       tableColumns:[
             { title: "序号", type:'index', align: "center",resizable: true,
                         width: 100 },
-                // { title: "组合名称", key:'compose_name', align: "center",resizable: true,
-                //         width: 100 },
+                { title: "组合名称", key:'compose_name', align: "center",resizable: true,
+                        width: 100 },
               { title: "部件名称", key: "part_title", align: "center",resizable: true,
                         width: 140 },
                 { title: "行号", key: "line_number", align: "center", resizable: true,