Parcourir la source

修改代码---cjh

17767204043 il y a 3 ans
Parent
commit
9ac3c4e8f9
4 fichiers modifiés avec 15532 ajouts et 451 suppressions
  1. 14887 1
      package-lock.json
  2. 140 157
      src/views/Agreement/match/check.vue
  3. 12 17
      src/views/Agreement/match/list.vue
  4. 493 276
      src/views/Agreement/match/matching.vue

Fichier diff supprimé car celui-ci est trop grand
+ 14887 - 1
package-lock.json


+ 140 - 157
src/views/Agreement/match/check.vue

@@ -20,16 +20,16 @@
     </Toptitle>
     <Row style="padding: 10px; font-size: 18px">
       <Col span="4">
-        <span>金螳螂ID:</span><span>{{ project_number }}</span>
+        <span>金螳螂ID:</span><span>{{ detailList.jtl_id }}</span>
       </Col>
       <Col span="4">
-        <span>项目编号:</span><span>{{ project_name }}</span>
+        <span>项目编号:</span><span>{{ detailList.order_no }}</span>
       </Col>
       <Col span="4">
-        <span>项目名称:</span><span>{{ project_name }}</span>
+        <span>项目名称:</span><span>{{ detailList.abbreviation }}</span>
       </Col>
       <Col span="4">
-        <span>项目简介:</span><span>{{ project_name }}</span>
+        <span>项目简介:</span><span>{{ detailList.project_title }}</span>
       </Col>
     </Row>
     <div class="context-tabs">
@@ -46,22 +46,15 @@
               align-items: center;
             "
           >
-            <div v-if="matched_info.matching_status == 2">
-              <Checkbox
-                v-show="matched_info.produce_status != 0"
-                v-model="matched_info.isSelect"
-                @on-change="(e) => handleMatchedSelect(matched_info, e)"
-                >选择</Checkbox
-              >
+            <div>
               <Checkbox
-                v-show="matched_info.produce_status == 0"
                 v-model="matched_info.del_isSelect"
                 @on-change="(e) => MatchedSelect(matched_info, e)"
                 class="del_check"
                 >选择</Checkbox
               >
             </div>
-            <span>制单日期:{{ matched_info.image_number }}</span>
+            <span>制单日期:{{ matched_info.crt_time }}</span>
             <!-- <div style="margin-left:100px">
                 <span>{{
               matched_info.matching_status == 0
@@ -88,19 +81,19 @@
             }}</span>
           </Col> -->
           <Col style="display: flex; justify-content: space-between" span="6">
-            <span v-if="matched_info.matching_status == 2">
+            <span>
               <Button
                 @click="handleGoProduction(2, matched_info)"
                 type="primary"
                 size="small"
-                :disabled="matched_info.produce_status != 0"
+                :disabled="matched_info.product_state != 0"
                 >下生产通知</Button
               >
             </span>
 
             <div>
               总计
-              <span style="color: red">{{ matched_info.num }}</span>
+              <span style="color: red">{{ matched_info.total }}</span>
               条数据
             </div>
             <div>
@@ -220,12 +213,16 @@
               border
               :max-height="500"
               on-selection-change
-              :data="matched_detail.detail"
+              :data="matched_detail.data"
               style="width: 100%"
             >
-              <template slot="setSlot" slot-scope="{ row, index }">
-                <a @click="handleSet(row, index, 1)" style="margin: 0 5px"
-                  >下生产</a
+              <template slot="setSlot" slot-scope="{ row }">
+                <Button
+                  @click="underProduction(row)"
+                  style="margin: 0 5px"
+                  type="text"
+                  :disabled="productionBtn"
+                  >下生产</Button
                 >
               </template>
             </Table>
@@ -233,43 +230,14 @@
         </div>
       </div>
     </div>
-    <Modal v-model="processModal" title="下生产">
+    <Modal v-model="processModal" title="下生产通知">
       <div>
         <div class="process_modal">
-          <span>生产人员:</span>
-          <Select
-            v-model="process_man"
-            filterable
-            filter-by-label
-            clearable
-            style="width: 150px"
-          >
-            <Option
-              v-for="item in processManList"
-              :key="item.id"
-              :label="item.nickname"
-              :value="item.id"
-            >
-            </Option>
-          </Select>
-        </div>
-        <div class="process_modal">
-          <span>选择时间:</span>
-          <DatePicker
-            type="date"
-            :options="options"
-            v-model="process_start_time"
-            placeholder="年/月/日"
-            style="width: 150px"
-          ></DatePicker>
-          至
-          <DatePicker
-            type="date"
-            :options="options"
-            v-model="process_end_time"
-            placeholder="年/月/日"
-            style="width: 150px"
-          ></DatePicker>
+          <span>生产通知单号:</span>
+          <Input
+            v-model="processNumber"
+            style="width: 50%; margin-left: 20px"
+          ></Input>
         </div>
       </div>
       <div slot="footer">
@@ -280,39 +248,19 @@
           style="margin-right: 10px"
           >取消</Button
         >
-        <Button
-          @click="handleProcess"
-          type="primary"
-          style="margin-right: 10px"
-          :disabled="process_control"
+        <Button @click="handleProcess" type="primary" style="margin-right: 10px"
           >确定</Button
         >
       </div>
     </Modal>
-    <Modal
-      v-model="showDel"
-      title=""
-      @on-ok="important_del"
-      :closable="false"
-      style="text-align: center"
-      :width="30"
-    >
-      <div style="margin-top: 30px">
-        <span style="margin-right: 10px">用户姓名:</span
-        ><Input v-model="delData.user_name" style="width: 70%"></Input>
-      </div>
-      <div style="margin-top: 30px">
-        <span style="margin: 0 10px 0 23px">密码:</span
-        ><Input v-model="delData.password" style="width: 70%"></Input>
-      </div>
-    </Modal>
+    <div @click="test()">测试按钮</div>
   </div>
 </template>
 
 <script>
 // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 // 例如:import 《组件名称》 from '《组件路径》';
-import Vue from 'vue'
+import Vue from "vue";
 export default {
   name: "",
   components: {},
@@ -321,21 +269,15 @@ export default {
   data() {
     // 这里存放数据
     return {
-      delData: {
-        user_name: "",
-        password: "",
-      },
+      processNumber: "", //下生产通知单号
       options: {},
       project_number: this.$route.query.project_number,
       project_name: this.$route.query.project_name,
       isMatchedSelectAll: false,
       matchedInfo: {
-        id: this.$route.query.id,
-        image_number: "",
-        product_name: "",
-        region: [],
-        number: [],
-        part_name: [],
+        region:"", //区域
+        url_number:"",//图号
+        product_title:""//产品名称
       },
       urlMatchedList: [],
       productMatchedList: [],
@@ -344,6 +286,7 @@ export default {
       partNameMatchedList: [],
       matchedDetailList: [],
       matchedList: [],
+      productionBtn: false,
       matchedSheetTableColumns: [
         {
           type: "selection",
@@ -397,13 +340,11 @@ export default {
       processModal: false,
       process_man: "",
       processManList: [],
-      process_start_time: "",
-      process_end_time: "",
-      process_control: false,
       cut_order_product_ids: [],
       matchedSelectedList: [],
       delList: [],
       showDel: false,
+      detailList: {},
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -414,27 +355,86 @@ export default {
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    this.initData();
+    // this.initData();
+    this.detail(); //详情接口
+    this.deepenList();
   },
   methods: {
-    
-    ifCheckAll(s){//   判断table中是否全选
-      console.log(s,"这是table中的数据");
+    test(){
+      console.log(this.func.replaceDate(1651852800).split(' ')[0]);
+      
     },
-    important_del() {
-      this.axios
-        .post("/api/delete_cut_order_product", {
-          id: [...this.delList],
-          ...this.delData,
-        })
-        .then((res) => {
-          if (res.code == 200) {
-            this.$Message.success(res.msg);
-            this.delList = [];
-            this.isMatchedSelectAll = false;
-            this.initData();
-          }
+    detail() {
+      //详情接口
+      this.axios({
+        method: "post",
+        url: "/api/contract_match_detail",
+        params: { order_no: this.$route.query.order_no },
+      }).then((res) => {
+        if (res.code == 200) {
+          console.log(res);
+          this.detailList = res.data;
+        }
+      });
+    },
+    deepenList() {
+      //深化信息接口
+      this.axios({
+        method: "post",
+        url: "/api/contract_match_detail_deep",
+        params: { order_no: this.$route.query.order_no, state: 0 },
+      }).then((res) => {
+        this.matchedList = [];
+        res.data.map((v) => {
+          v.isCurrenct = false;
         });
+        this.matchedList = res.data
+        // this.urlMatchedList = res.data.image_number;
+        // this.productMatchedList = res.data.product_name;
+        // this.matchedList = res.data.list;
+        // res.data.list.forEach((v, index) => {
+        //   if (v.matching_status == 2) {
+        //     this.matchedList.push(v);
+        //   }
+        // });
+      });
+    },
+    underProduction(row) {
+      //表单里点击下生产事件
+      console.log(row);
+      this.processModal = true;
+    },
+    handleProcess() {
+      //下生产通知弹框二次确认
+      this.process_control = true;
+      console.log(this.cut_order_product_ids);
+      this.axios({
+        method: "post",
+        url: "/api/bst_pull",
+        data: {
+          cut_order_product_ids: this.cut_order_product_ids,
+          process_man: this.process_man,
+          process_start_time: this.func.replaceDateNoHMS(
+            this.process_start_time
+          ),
+          process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.processModal = false;
+          this.matchedSelectedList = [];
+          // this.initData();
+          this.detail()
+        }
+        setTimeout(() => {
+          this.process_control = false;
+        }, 500);
+      });
+    },
+    ifCheckAll(s) {
+      //   判断table中是否全选
+      console.log(s, "这是table中的数据");
     },
     handelDel() {
       if (this.delList.length == 0) {
@@ -452,7 +452,7 @@ export default {
       this.matchedSelectedList = [];
       // this.matchedList.map((v) => {
       //     v.isCurrenct = true
-      //     if (v.produce_status == 0) {
+      //     if (v.product_state == 0) {
       //         v.isSelect = this.isMatchedSelectAll;
       //         if (v.isSelect) {
       //             this.matchedSelectedList.push(v.id)
@@ -480,9 +480,9 @@ export default {
       row.isSelect = e;
       let flag = true;
       this.matchedSelectedList = [];
-      
+
       this.matchedList.map((v) => {
-        if (v.produce_status == 0) {
+        if (v.product_state == 0) {
           if (v.isSelect) {
             this.matchedSelectedList.push(v.id);
           } else {
@@ -544,32 +544,8 @@ export default {
           }
         });
     },
-    handleProcess() {
-      this.process_control = true;
-      this.axios({
-        method: "post",
-        url: "/api/bst_pull",
-        data: {
-          cut_order_product_ids: this.cut_order_product_ids,
-          process_man: this.process_man,
-          process_start_time: this.func.replaceDateNoHMS(
-            this.process_start_time
-          ),
-          process_end_time: this.func.replaceDateNoHMS(this.process_end_time),
-        },
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$Message.success(res.msg);
-          this.processModal = false;
-          this.matchedSelectedList = [];
-          this.initData();
-        }
-        setTimeout(() => {
-          this.process_control = false;
-        }, 500);
-      });
-    },
     initData() {
+      //获取table中的数据
       this.axios
         .get("/api/bst_matching_on_list", {
           params: {
@@ -606,36 +582,43 @@ export default {
         row.isCurrenct = !row.isCurrenct;
       } else {
         this.matchedList.map((v) => (v.isCurrenct = false));
-    //     this.matchedList.forEach(e=>{
-    //       debugger
-    //       if(e.id == row.id){
-    //           this.$set(e,"test",true)
-    //       }else if(e.test){
-    //           delete(e.test)
-    //       }else{
-    //           return
-    //       }
-    //   })
-    //   console.log(this.matchedList,"测试");
+        //     this.matchedList.forEach(e=>{
+        //       if(e.id == row.id){
+        //           this.$set(e,"test",true)
+        //       }else if(e.test){
+        //           delete(e.test)
+        //       }else{
+        //           return
+        //       }
+        //   })
+        //   console.log(this.matchedList,"测试");
         row.isCurrenct = true;
       }
       this.getMatchedDetailList(row);
     },
     getMatchedDetailList(row) {
+      console.log(row);
       row.isCurrenct &&
         this.axios
-          .post("/api/bst_matching_on_detail", {
-            cut_order_product_id: row.id,
-            id: this.matchedInfo.id,
-            number: this.matchedInfo.number,
-            part_name: this.matchedInfo.part_name,
-            region: this.matchedInfo.region,
+          .post("/api/contract_match_detail_deep_open", {
+            // cut_order_product_id: row.id,
+            // id: this.matchedInfo.id,
+            // number: this.matchedInfo.number,
+            // part_name: this.matchedInfo.part_name,
+            // region: this.matchedInfo.region,
+            order_no:row.order_no,
+            state:1,
+            crt_time:row.crt_time,
+            region:this.matchedInfo.region,
+            product_title:this.matchedList.product_title,
+            url_number:this.matchedList.url_number
           })
           .then((res) => {
-            this.regionMatchedList = res.data.region;
-            this.numberMatchedList = res.data.number;
-            this.partNameMatchedList = res.data.part_name;
-            this.matchedDetailList = res.data.list;
+            console.log(res);
+            // this.regionMatchedList = res.data.region;
+            // this.numberMatchedList = res.data.number;
+            // this.partNameMatchedList = res.data.part_name;
+            this.matchedDetailList = res.data.data;
             this.$nextTick(function () {
               if (row.del_isSelect == true || row.isSelect == true) {
                 this.$refs.selection[0].selectAll(true);

+ 12 - 17
src/views/Agreement/match/list.vue

@@ -8,25 +8,25 @@
       <Col span="5">
         <span>金螳螂ID:</span>
         <span>
-          <Input clearable v-model="SearchInfo.project_number" style="width:140px"  />
+          <Input clearable v-model="SearchInfo.jtl_id" style="width:140px"  />
         </span>
       </Col>
       <Col span="5">
         <span>项目编号:</span>
         <span>
-          <Input clearable v-model="SearchInfo.project_name" style="width:140px"  />
+          <Input clearable v-model="SearchInfo.order_no" style="width:140px"  />
         </span>
       </Col>
       <Col span="5">
         <span>项目名称:</span>
         <span>
-          <Input clearable v-model="SearchInfo.project_short_title" style="width:140px"  />
+          <Input clearable v-model="SearchInfo.abbreviation" style="width:140px"  />
         </span>
       </Col>
       <Col span="5">
         <span>项目简称:</span>
         <span>
-          <Input clearable v-model="SearchInfo.project_short_title" style="width:140px"  />
+          <Input clearable v-model="SearchInfo.project_title" style="width:140px"  />
         </span>
       </Col>
       <Col span="2" offset="2">
@@ -81,14 +81,14 @@ export default {
         {
           title: "金螳螂ID",
           align: "center",
-          key: "project_number",
+          key: "jtl_id",
          resizable: true,
                         width: 350
         },
         {
           title: "项目编号",
           align: "center",
-          key: "project_name",
+          key: "order_no",
           resizable: true,
                         width: 350
         },
@@ -102,7 +102,7 @@ export default {
        {
           title: "项目简介",
           align: "center",
-          key: "abbreviation",
+          key: "project_title",
           resizable: true,
                         width: 350
         },
@@ -123,9 +123,9 @@ export default {
   methods: {
     initData() {
       this.axios({
-        method: "get",
-        url: "/api/bst_matching_list",
-        params: {...this.SearchInfo,page_index:this.page_index,page_size:this.page_size},
+        method: "post",
+        url: "/api/contract_match_list",
+        params: { ...this.SearchInfo,page_index:this.page_index,page_size:this.page_size},
       }).then((res) => {
         if (res.code == 200) {
           this.tableData = res.data.data;
@@ -134,16 +134,13 @@ export default {
       });
     },
     handleSet(row, index, type) {
-        debugger
       switch (type) {
         case 1:
           this.$router.push({
             path: "/cms/Agreement/match/matching",
             query: {
               type,
-              id: row.id,
-              project_number: row.project_number,
-              project_name: row.project_name,
+              order_no:row.order_no
             },
           });
           break;
@@ -152,9 +149,7 @@ export default {
             path: "/cms/Agreement/match/check",
             query: {
               type,
-              id: row.id,
-              project_number: row.project_number,
-              project_name: row.project_name,
+              order_no:row.order_no
             },
           });
           break;

Fichier diff supprimé car celui-ci est trop grand
+ 493 - 276
src/views/Agreement/match/matching.vue


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff