Andy 3 yıl önce
ebeveyn
işleme
6a7fc710cf

+ 93 - 80
src/components/table-column/index.vue

@@ -1,56 +1,58 @@
 <template>
   <div style="background:#fff;">
-    <Table class="over-columns"
-           :columns="tableColums"
-           :data='tableDatas'>
-      <template slot='set'
-                slot-scope='{row}'>
+    <Table class="over-columns" :columns="tableColums" :data="tableDatas">
+      <template slot="set" slot-scope="{ row }">
         <div class="table-set">
-          <svg @click="addItems(row,1,null)"
-               class="icon icon-nav"
-               aria-hidden="true">
+          <svg
+            @click="addItems(row, 1, null)"
+            class="icon icon-nav"
+            aria-hidden="true"
+          >
             <use xlink:href="#iconxinzengshuxing"></use>
           </svg>
 
-          <svg style="font-size:20px"
-               color='#3764FF'
-               @click="addItems(row,2,1)"
-               class="icon icon-nav"
-               aria-hidden="true">
+          <svg
+            style="font-size:20px"
+            color="#3764FF"
+            @click="addItems(row, 2, 1)"
+            class="icon icon-nav"
+            aria-hidden="true"
+          >
             <use xlink:href="#iconbianji"></use>
           </svg>
 
-          <svg @click="delItems(row)"
-               class="icon icon-nav"
-               style="font-size:20px"
-               color='red'
-               aria-hidden="true">
+          <svg
+            @click="delItems(row)"
+            class="icon icon-nav"
+            style="font-size:20px"
+            color="red"
+            aria-hidden="true"
+          >
             <use xlink:href="#iconshanchu"></use>
           </svg>
         </div>
       </template>
     </Table>
-    <Modal class-name="vertical-center-modal"
-           @on-ok="postInfo"
-           :title="showType == 1 ? '添加子集': '编辑子集'"
-           v-model="showModal"
-           :width="480"
-           @on-visible-change='vivibleModal'>
+    <Modal
+      class-name="vertical-center-modal"
+      @on-ok="postInfo"
+      :title="showType == 1 ? '添加子集' : '编辑子集'"
+      v-model="showModal"
+      :width="480"
+      @on-visible-change="vivibleModal"
+    >
       <Form :label-width="90">
         <FormItem label="ID:">
-          <Input disabled
-                 placeholder="ID自动生成"
-                 v-model="classInfo.id" />
+          <Input disabled placeholder="ID自动生成" v-model="classInfo.id" />
         </FormItem>
         <FormItem label="分类名称:">
-          <Input placeholder="请输入分类名称"
-                 v-model="classInfo.title" />
+          <Input placeholder="请输入分类名称" v-model="classInfo.title" />
         </FormItem>
-        <FormItem label='类型:'>
+        <FormItem label="类型:">
           <Select v-model="classInfo.type">
-            <Option :value='1'>生产</Option>
-            <Option :value='2'>运输</Option>
-            <Option :value='3'>安装</Option>
+            <Option :value="1">生产</Option>
+            <Option :value="2">运输</Option>
+            <Option :value="3">安装</Option>
           </Select>
         </FormItem>
       </Form>
@@ -59,7 +61,7 @@
 </template>
 
 <script>
-import { mapActions } from 'vuex'
+import { mapActions } from "vuex";
 export default {
   props: {
     tableDatas: {
@@ -67,87 +69,98 @@ export default {
       default: null,
     },
   },
-  data () {
-    let vm = this
+  data() {
+    let vm = this;
     return {
       tableColums: [
         {
-          title: '展开', type: 'expand', width: '70', align: 'center', slot: 'costom',
-          render (h, params) {
-            return h('Tables', {
+          title: "展开",
+          type: "expand",
+          width: "70",
+          align: "center",
+          slot: "costom",
+          render(h, params) {
+            return h("Tables", {
               props: {
-                tableDatas: params.row.child || []
+                tableDatas: params.row.child || [],
               },
               on: {
-                updataTables: (array) => { vm.$emit('updataTables', array) }
-              }
-            })
-          }
+                updataTables: (array) => {
+                  vm.$emit("updataTables", array);
+                },
+              },
+            });
+          },
         },
-        { title: '序号', type: 'index', align: 'center', key: '' },
+        { title: "序号", type: "index", align: "center", key: "" },
         // {title:'ID',key:'',align:'center',key:'id'},
-        { title: '工序分类名称', key: '', align: 'center', key: 'title' },
-        { title: '操作', key: '', align: 'center', slot: 'set', width: '150' },
+        { title: "工序分类名称", align: "center", key: "title" },
+        { title: "操作", key: "", align: "center", slot: "set", width: "150" },
       ],
       classInfo: {},
       showType: 1,
       showModal: false,
       tableData: [],
-    }
+    };
   },
   methods: {
-    ...mapActions(['undata_navData']),
-    addItems (obj, type, edit) {
-      this.showModal = true
+    ...mapActions(["undata_navData"]),
+    addItems(obj, type, edit) {
+      this.showModal = true;
       this.showType = type;
       this.classInfo.id = obj.id;
-      this.classInfo.title = edit == 1 ? obj.title : '';
+      this.classInfo.title = edit == 1 ? obj.title : "";
       this.classInfo.type = obj.type || 1;
     },
-    postInfo () {
-      let post_url = this.showType == 1 ? '/api/basics_procedure_add' : '/api/basics_procedure_edit';
-      this.axios.post(post_url, this.classInfo).then(res => {
+    postInfo() {
+      let post_url =
+        this.showType == 1
+          ? "/api/basics_procedure_add"
+          : "/api/basics_procedure_edit";
+      this.axios.post(post_url, this.classInfo).then((res) => {
         if (res.code == 200) {
-          this.$Message.success(res.msg)
-          this.getData()
-          this.undata_navData()
+          this.$Message.success(res.msg);
+          this.getData();
+          this.undata_navData();
         }
-      })
+      });
     },
-    vivibleModal (e) {
+    vivibleModal(e) {
       if (!e) {
         this.classInfo = {
           id: null,
-          title: '',
+          title: "",
           type: null,
-        }
+        };
       }
     },
-    getData (row) {
+    getData(row) {
       this.loading = true;
-      this.axios('/api/basics_procedure_index').then(res => {
+      this.axios("/api/basics_procedure_index").then((res) => {
         this.loading = false;
         this.tableData = res.data.data;
         this.total = res.data.total;
-        this.$emit('updataTables', this.tableData)
-      })
+        this.$emit("updataTables", this.tableData);
+      });
     },
-    delItems (row) {
+    delItems(row) {
       this.confirmDelete({
-        content: '确认删除么?',
+        content: "确认删除么?",
         then: () => {
-          this.axios.post('/api/basics_procedure_del', { id: row.id, state: 0 }).then(res => {
-            if (res.code == 200) {
-              this.$Message.success(res.msg)
-              this.getData()
-              this.undata_navData()
-            }
-          })
-        }
-      })
+          this.axios
+            .post("/api/basics_procedure_del", { id: row.id, state: 0 })
+            .then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.getData();
+                // this.undata_navData();
+              }
+            });
+        },
+      });
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -166,4 +179,4 @@ export default {
 td.ivu-table-expanded-cell {
   padding: 15px 10px;
 }
-</style>
+</style>

+ 0 - 4
src/views/BasicSettings/Process.vue

@@ -81,7 +81,6 @@
 
 <script>
 import Tables from '../../components/table-column/index'
-import { mapActions } from 'vuex'
 export default {
   data () {
     const vm = this
@@ -120,7 +119,6 @@ export default {
     }
   },
   methods: {
-    ...mapActions(['undata_navData']),
     init (row) {
       this.pageIndex = 1
       row.page_size = this.pageSize;
@@ -152,7 +150,6 @@ export default {
         if (res.code == 200) {
           this.$Message.success(res.msg)
           this.getData(this.searchObj)
-          // this.undata_navData()
         }
       })
     },
@@ -185,7 +182,6 @@ export default {
             if (res.code == 200) {
               this.$Message.success(res.msg)
               this.getData(this.proxyObj)
-              // this.undata_navData()
             }
           })
         }

+ 24 - 12
src/views/BidSystem/ContractList/edit.vue

@@ -1155,19 +1155,19 @@ export default {
         },
       ],
       supTableColumns: [
-        { title: "序号", type: "index", align: "center" },
+        { title: "序号", type: "index", align: "center", minWidth: 100 },
         {
           title: "辅料名称",
           key: "title",
           align: "center",
           slot: "combine",
-          minWidth: 60,
+          minWidth: 150,
         },
-        { title: "操作", key: "set", align: "center", slot: "supSet" },
+        { title: "操作", align: "center", slot: "supSet", minWidth: 100 },
       ],
-      supTableData: [], //产品分类列表
-      PDTTypeList: [], //项目辅料→辅料名称列表
-      PDTEditTypeList: [], //项目辅料→辅料名称列表
+      supTableData: [], //项目辅料→辅料名称列表
+      PDTTypeList: [], // 产品分类列表
+      PDTEditTypeList: [], // 产品分类列表
       combineList: [], //业务员列表
       salesmanList: [],
       tempPDTIndex: "", // 新增产品暂存
@@ -1286,6 +1286,9 @@ export default {
         },
       }).then((res) => {
         this.formData = res.data;
+        // console.log('supTableData :>> ', this.supTableData);
+        this.supTableData = res.data.ext;
+        // console.log('supTableData :>> ', this.supTableData);
         if (this.formData.list.length == 0) {
           this.formData.list.push({
             areaIndex: 1,
@@ -1507,6 +1510,13 @@ export default {
       });
     },
     postData() {
+      this.formData.list.map((list) => {
+        list.product.map((product) => {
+          product.special.map((value) => {
+            value.value = product[value.key];
+          });
+        });
+      });
       //1新增 2编辑
       let ip;
       if (this.type == 1) {
@@ -1516,7 +1526,8 @@ export default {
           url: "/api/" + ip,
           data: {
             ...this.formData,
-            supTableData: this.supTableData,
+            ext: this.supTableData,
+            head: { 3: this.productSpecValueList },
           },
         }).then((res) => {
           if (res.code == 200) {
@@ -1557,7 +1568,8 @@ export default {
               this.axios
                 .post("/api/" + ip, {
                   ...this.formData,
-                  supTableData: this.supTableData,
+                  ext: this.supTableData,
+                  head: { 3: this.productSpecValueList },
                 })
                 .then((re) => {
                   if (re.code == 200) {
@@ -1939,10 +1951,10 @@ export default {
     },
     //项目辅料新增
     handleAddSup() {
-      this.supTableData.push({ index: "", id: "" });
-      this.supTableData.forEach((element, index) => {
-        element.index = index + 1;
-      });
+      this.supTableData.push({ id: "" });
+      // this.supTableData.forEach((element, index) => {
+      //   element.index = index + 1;
+      // });
     },
     //项目辅料删除
     handleSupSet(row, index) {

+ 13 - 16
src/views/BidSystem/ContractList/list.vue

@@ -771,22 +771,19 @@ export default {
           serverName: "state",
           value: "",
           option: [
-            { label: "订单未审核", value: 1 },
-            { label: "订单审核中", value: 2 },
-            { label: "订单通过", value: 3 },
-            { label: "深化未审核", value: 4 },
-            { label: "深化审核中", value: 5 },
-            { label: "深化通过", value: 6 },
-            { label: "拆单未审核", value: 7 },
-            { label: "拆单审核中", value: 8 },
-            { label: "拆单通过", value: 9 },
-            { label: "生产未审核", value: 10 },
-            { label: "生产审核中", value: 11 },
-            { label: "到生产计划", value: 12 },
-            { label: "派工", value: 13 },
-            { label: "包装", value: 14 },
-            { label: "发货", value: 15 },
-            { label: "安装", value: 16 },
+            { label: "订单审核中", value: 0 },
+            { label: "深化中", value: 1 },
+            { label: "深化审核中", value: 2 },
+            { label: "深化通过", value: 3 },
+            { label: "拆单中", value: 4 },
+            { label: "拆单审核中", value: 5 },
+            { label: "拆单通过", value: 6 },
+            { label: "生产审核中", value: 7 },
+            { label: "到生产计划", value: 8 },
+            { label: "派工", value: 9 },
+            { label: "包装", value: 10 },
+            { label: "发货", value: 11 },
+            { label: "安装", value: 12 },
           ],
         },
         {

+ 14 - 9
src/views/BidSystem/DeepeningOrder/detail.vue

@@ -381,6 +381,12 @@
             </template>
             <template slot="set" slot-scope="{ row, index }">
               <a
+                style="margin:0 5px"
+                :disabled="isChecked"
+                @click="handleSet(row, index, 1, formData)"
+                >深化</a
+              >
+              <a
                 style="margin: 0 5px"
                 @click="handleSet(row, index, 4, formData)"
                 >详情</a
@@ -799,15 +805,15 @@ export default {
       ],
       productDetail: {},
       supTableColumns: [
-        { title: "序号", type: "index", align: "center" },
+        { title: "序号", type: "index", align: "center", minWidth: 100 },
         {
           title: "辅料名称",
           key: "title",
           align: "center",
           slot: "combine",
-          minWidth: 60,
+          minWidth: 150,
         },
-        { title: "操作", key: "set", align: "center", slot: "supSet" },
+        { title: "操作", align: "center", slot: "supSet", minWidth: 100 },
       ],
       //是否查看
       isChecked: false,
@@ -964,6 +970,8 @@ export default {
         })
         .then((res) => {
           this.listTableData = res.data.data;
+          // this.supTableData = res.data.ext
+
           this.listTableData.map((item) => {
             !item.url && (item.url = []);
             res.data.imgs.map((element) => {
@@ -1231,7 +1239,7 @@ export default {
             this.axios
               .post("/api/" + ip, {
                 ...this.formData,
-                supTableData: this.supTableData,
+                ext: this.supTableData,
               })
               .then((re) => {
                 if (re.code == 200) {
@@ -1391,7 +1399,7 @@ export default {
             type,
             order_no: this.formData.order_no,
             order_area_id: item.id,
-            order_area_product_id: row.id?row.id:row.order_area_product_id,
+            order_area_product_id: row.id ? row.id : row.order_area_product_id,
           },
         });
       }
@@ -1465,10 +1473,7 @@ export default {
     },
     //项目辅料新增
     handleAddSup() {
-      this.supTableData.push({ index: "", title: "" });
-      this.supTableData.forEach((element, index) => {
-        element.index = index + 1;
-      });
+      this.supTableData.push({ id: "" });
     },
     //项目辅料删除
     handleSupSet(row, index) {

+ 2 - 2
src/views/BidSystem/DeepeningOrder/list.vue

@@ -217,7 +217,7 @@ export default {
             h("span", {}, this.func.replaceDateNoHMS(params.row.end_time)),
         },
         {
-          title: "订单状态",
+          title: "深化状态",
           align: "center",
           key: "state",
           minWidth: 100,
@@ -454,7 +454,7 @@ export default {
           serverName: "mobile",
         },
         {
-          title: "订单状态",
+          title: "深化状态",
           name: "Select",
           placeholder: "请选择",
           serverName: "state",

+ 40 - 40
src/views/BidSystem/ProductDeOrder/budget.vue

@@ -2,11 +2,23 @@
   <div class="BidSystemProductDeOrderBudget">
     <Toptitle title="成本预算">
       <slot name="titleButton">
-        <Button @click="postData()"
-                type="primary"
-                style="margin-right:10px;">导出</Button>
+        <Button @click="postData()" type="primary" style="margin-right:10px;"
+          >导出</Button
+        >
       </slot>
     </Toptitle>
+    <div class="body" style="margin-top:10px">
+      <Tabs type="card">
+        <TabPane label="产品信息">
+          <div class="product_info">
+            <div class="product_info_title"></div>
+            <div class="product_info_content"></div>
+            <div class="product_info_notice"></div>
+          </div>
+        </TabPane>
+        <TabPane label="成本预算">标签二的内容</TabPane>
+      </Tabs>
+    </div>
   </div>
 </template>
 
@@ -15,46 +27,34 @@
 // 例如:import 《组件名称》 from '《组件路径》';
 
 export default {
-  name:'BidSystemProductDeOrderBudget',
-  components:{
-    
-  },
-  props:{},
-// import引入的组件需要注入到对象中才能使用
-  data () {
+  name: "BidSystemProductDeOrderBudget",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
     // 这里存放数据
-    return {
-
-    }
-  },
-// 生命周期 - 创建完成(可以访问当前this实例)
-  created () {
-
-  },
-// 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
-
+    return {};
   },
-  methods: {
-
-  },
-// 监听属性 类似于data概念
-computed: {},
-// 监控data中的数据变化
-watch: {},
-beforeCreate () { }, // 生命周期 - 创建之前
-beforeMount () { }, // 生命周期 - 挂载之前
-beforeUpdate () { }, // 生命周期 - 更新之前
-updated () { }, // 生命周期 - 更新之后
-beforeDestroy () { }, // 生命周期 - 销毁之前
-destroyed () { }, // 生命周期 - 销毁完成
-activated () { }, // 如果页面有keep-alive缓存功能,这个函数会触发
-}
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+  methods: {},
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 
-<style lang='scss' scoped>
-.BidSystemProductDeOrderBudget{
-
+<style lang="scss" scoped>
+.BidSystemProductDeOrderBudget {
 }
-
 </style>

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

@@ -284,6 +284,7 @@
             :key="_item.type_title"
           >
             <!-- v-show="_item.display" -->
+              <!-- v-show="_item.list && _item.list.length > 0" -->
             <span
               :class="['box-us', _item.show ? 'box-us-foc' : '']"
               @click="setBoxChange(item, _item)"
@@ -1285,7 +1286,6 @@ export default {
               res.data.product_id,
               this.formData
             );
-
             // this.formData.parts.map((element) => {
             //   console.log('element :>> ', element);
             //   element.partsProcessLineTableData = [];
@@ -1380,10 +1380,10 @@ export default {
     handleSimilarProductShow() {
       this.showSimilarProductModal = true;
       this.similarProductLoading = true;
-      this.similarProductData.type_name = '';
-      this.similarProductData.title = '';
-      this.similarProductData.model = '';
-      this.similarProductData.url_number = '';
+      this.similarProductData.type_name = "";
+      this.similarProductData.title = "";
+      this.similarProductData.model = "";
+      this.similarProductData.url_number = "";
       this.axios("/api/product", {
         params: {
           type_name: this.similarProductData.type_name,
@@ -1508,6 +1508,7 @@ export default {
                         let item = isEditItem;
                         // let item = JSON.parse(JSON.stringify(isEditItem));
                         item.parts.forEach((element) => {
+                          console.log('element :>> ', element);
                           element.processCombination = element.route_id;
                           let obj = { value: element.route_id, label: "" };
                           this.handleProcessRouteSelect(element, obj);
@@ -1572,7 +1573,7 @@ export default {
         id: val,
         title: val,
       });
-      this.$forceUpdate()
+      this.$forceUpdate();
     },
     // 部件名称
     handlePartsNameSelect(item, val) {

+ 157 - 51
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -168,6 +168,8 @@
           <Select
             placeholder="请选择负责人"
             v-if="type != 3"
+            clearable
+            filterable
             v-model="info.custom_detail_name"
             @on-change="handleClientChargeChange"
             class="auto-width"
@@ -310,7 +312,9 @@
           v-if="
             formSetTableData.filter((v) => v.key == 'order_price')[0].is_show
           "
-          :label="formSetTableData.filter((v) => v.key == 'order_price')[0].title"
+          :label="
+            formSetTableData.filter((v) => v.key == 'order_price')[0].title
+          "
         >
           <Input
             v-model="info.order_price"
@@ -813,6 +817,7 @@
                     <Input
                       size="small"
                       v-model="item.num"
+                      disabled
                       style="width: 120px"
                       placeholder="自动带出"
                     />
@@ -977,7 +982,10 @@
                   :key="element.id + '111' + idx"
                   :label-width="50"
                 >
-                  <FormItem :label-width="element.isBP ? 1 : 50">
+                  <FormItem
+                    :label-width="element.isBP ? 1 : 50"
+                    v-show="!element.is_metal"
+                  >
                     <Radio
                       v-show="element.isBP"
                       @click.native.prevent="handleRadioClick(element)"
@@ -985,7 +993,7 @@
                     ></Radio>
                     <span v-show="element.isBP">{{ element.part_title }} </span>
                   </FormItem>
-                  <FormItem label="部件:">
+                  <FormItem label="部件:" v-show="!element.is_metal">
                     <Select
                       filterable
                       clearable
@@ -1006,7 +1014,7 @@
                       ></Option>
                     </Select>
                   </FormItem>
-                  <FormItem label="高:">
+                  <FormItem label="高:" v-show="!element.is_metal">
                     <Input
                       size="small"
                       clearable
@@ -1015,7 +1023,7 @@
                       placeholder="请输入厚"
                     />
                   </FormItem>
-                  <FormItem label="宽:">
+                  <FormItem label="宽:" v-show="!element.is_metal">
                     <Input
                       size="small"
                       clearable
@@ -1024,7 +1032,7 @@
                       placeholder="请输入宽"
                     />
                   </FormItem>
-                  <FormItem label="厚:">
+                  <FormItem label="厚:" v-show="!element.is_metal">
                     <Input
                       size="small"
                       clearable
@@ -1037,6 +1045,7 @@
                     v-for="(process_detail, idx) in element.process"
                     :key="process_detail.name + '222' + element.part_id"
                     :label="process_detail.name + ':'"
+                    v-show="!element.is_metal"
                   >
                     <Tooltip style="width: 120px" transfer>
                       <span slot="content">
@@ -1067,7 +1076,7 @@
                       </Select>
                     </Tooltip>
                   </FormItem>
-                  <FormItem>
+                  <FormItem v-show="!element.is_metal">
                     <Button
                       @click="handlePartsApart(element, idx, item.part)"
                       type="primary"
@@ -1312,7 +1321,9 @@
                   <FormItem>
                     <a
                       style="color: red"
-                      @click="handleExtraDele(item.metalArray, element, idx)"
+                      @click="
+                        handleExtraDele(item.metalArray, element, idx, item)
+                      "
                       >删除</a
                     >
                   </FormItem>
@@ -1379,7 +1390,9 @@
                   <FormItem>
                     <a
                       style="color: red"
-                      @click="handleExtraDele(item.extArray, element, idx)"
+                      @click="
+                        handleExtraDele(item.extArray, element, idx, item)
+                      "
                       >删除</a
                     >
                   </FormItem>
@@ -1552,7 +1565,7 @@
                     <Input
                       size="small"
                       v-model="modalData.num"
-                      :disabled="isCheck"
+                      disabled
                       style="width: 120px"
                       placeholder="自动带出"
                     />
@@ -1731,7 +1744,10 @@
                   :key="element.id + '444' + idx"
                   :label-width="50"
                 >
-                  <FormItem :label-width="element.isBP ? 1 : 50">
+                  <FormItem
+                    :label-width="element.isBP ? 1 : 50"
+                    v-show="!element.is_metal"
+                  >
                     <Radio
                       v-show="element.isBP"
                       :disabled="isCheck"
@@ -1740,7 +1756,10 @@
                     ></Radio>
                     <span v-show="element.isBP">{{ element.part_title }} </span>
                   </FormItem>
-                  <FormItem label="部件:">
+                  <FormItem
+                    label="部件:"
+                    v-show="element.is_metal ? false : true"
+                  >
                     <Select
                       filterable
                       clearable
@@ -1766,7 +1785,7 @@
                       ></Option>
                     </Select>
                   </FormItem>
-                  <FormItem label="高:">
+                  <FormItem label="高:" v-show="!element.is_metal">
                     <Input
                       size="small"
                       clearable
@@ -1776,7 +1795,7 @@
                       placeholder="请输入厚"
                     />
                   </FormItem>
-                  <FormItem label="宽:">
+                  <FormItem label="宽:" v-show="!element.is_metal">
                     <Input
                       size="small"
                       clearable
@@ -1786,7 +1805,7 @@
                       placeholder="请输入宽"
                     />
                   </FormItem>
-                  <FormItem label="厚:">
+                  <FormItem label="厚:" v-show="!element.is_metal">
                     <Input
                       size="small"
                       clearable
@@ -1800,6 +1819,7 @@
                     v-for="(process_detail, idx) in element.process"
                     :key="idx + '555' + element.part_id"
                     :label="process_detail.name + ':'"
+                    v-show="!element.is_metal"
                   >
                     <Tooltip style="width: 120px" transfer>
                       <span slot="content">
@@ -1831,7 +1851,7 @@
                       </Select>
                     </Tooltip>
                   </FormItem>
-                  <FormItem>
+                  <FormItem v-show="!element.is_metal">
                     <Button
                       @click="handlePartsApart(element, idx, modalData.part)"
                       type="primary"
@@ -2098,8 +2118,14 @@
                   <FormItem>
                     <a
                       style="color: red"
+                      v-show="!isCheck"
                       @click="
-                        handleExtraDele(modalData.metalArray, element, idx)
+                        handleExtraDele(
+                          modalData.metalArray,
+                          element,
+                          idx,
+                          modalData
+                        )
                       "
                       >删除</a
                     >
@@ -2171,8 +2197,16 @@
                   </FormItem>
                   <FormItem>
                     <a
+                      v-show="!isCheck"
                       style="color: red"
-                      @click="handleExtraDele(modalData.extArray, element, idx)"
+                      @click="
+                        handleExtraDele(
+                          modalData.extArray,
+                          element,
+                          idx,
+                          modalData
+                        )
+                      "
                       >删除</a
                     >
                   </FormItem>
@@ -2443,10 +2477,6 @@ export default {
                 "on-change": (e) => {
                   currentRow.is_show = e;
                   this.post_formSetTableData.splice(index, 1, currentRow);
-                  console.log(
-                    "this.post_formSetTableData :>> ",
-                    this.post_formSetTableData
-                  );
                 },
               },
             });
@@ -2572,6 +2602,8 @@ export default {
         { is_show: true, key: "remark", value: "订单备注", title: "订单备注" },
       ],
       post_formSetTableData: [],
+      charge_list: [],
+      cus_list: [],
     };
   },
   computed: {
@@ -2582,6 +2614,16 @@ export default {
   },
   watch: {},
   created() {
+    // 获取负责人列表
+    this.axios.get("/api/support_service_name").then((res) => {
+      this.clientDetailList_respon = [];
+      res.data.map((item) => {
+        this.clientDetailList_respon.push({ service_name: item });
+      });
+      this.charge_list = JSON.parse(
+        JSON.stringify(this.clientDetailList_respon)
+      );
+    });
     // 获取设置表单
     this.get_forms();
     // 获取紧急程度
@@ -2591,6 +2633,7 @@ export default {
     });
     // 获取客户列表
     this.axios.get("/api/custom_list").then((res) => {
+      this.cus_list = JSON.parse(JSON.stringify(res.data.data));
       this.clientList = res.data.data;
     });
     // 获取五金列表
@@ -2649,7 +2692,11 @@ export default {
       this.axios
         .post("/api/update/get_table", { id: "businessorderlist_detail" })
         .then((res) => {
-          if (res.data.table.formSet && res.data.table.formSet.length > 0) {
+          if (
+            res.data.length > 0 &&
+            res.data.table.formSet &&
+            res.data.table.formSet.length > 0
+          ) {
             this.formSetTableData = JSON.parse(
               JSON.stringify(res.data.table.formSet)
             );
@@ -2658,7 +2705,7 @@ export default {
             );
           } else {
             this.post_formSetTableData = JSON.parse(
-              JSON.stringify(res.data.table.formSet)
+              JSON.stringify(this.formSetTableData)
             );
           }
         });
@@ -3056,7 +3103,7 @@ export default {
       //其他项
       this.modalData.other = this.modalData.customize;
       // 部件字段
-      this.modalData.part.forEach((elem) => {
+      this.modalData.part.forEach((elem, idx) => {
         if (!elem.is_metal) {
           elem.title ? "" : (elem.title = elem.part_title);
           // if (elem.procedure_properties_str && elem.procedure_properties_str != 0) {
@@ -3072,6 +3119,8 @@ export default {
           });
           elem.process_str = elem.procedure_properties_str.join("/");
           // }
+        } else {
+          this.modalData.part.splice(idx, 1);
         }
       });
       this.modalData.metalArray.map((item) => {
@@ -3080,14 +3129,14 @@ export default {
           title: item.title,
           unit_price: item.price,
           ext_price: item.num * item.price,
-          is_metal: false,
+          is_metal: true,
         };
         this.modalData.part.push(obj);
       });
       this.modalData.extra = "";
       this.modalData.extArray.map((item) => {
         const temp = this.extList.filter((it) => it.id == item.ext_id);
-        item.title = temp[0].title;
+        temp && temp.length > 0 && (item.title = temp[0].title);
       });
       this.modalData.extra = this.modalData.extArray.reduce((pre, cur) => {
         return pre + `${cur.title}/`;
@@ -3282,8 +3331,9 @@ export default {
       });
       this.$forceUpdate();
     },
-    handleExtraDele(array, row, index) {
+    handleExtraDele(array, row, index, modalData) {
       array.splice(index, 1);
+      this.handleTotalPriceCalc(row, modalData);
       this.$forceUpdate();
     },
     getCoumstList() {
@@ -3324,7 +3374,7 @@ export default {
       return arr;
     },
     handleClientChange(id) {
-      id &&
+      if (id) {
         this.axios({
           method: "get",
           url: "/api/custom_detail",
@@ -3356,6 +3406,12 @@ export default {
           this.fax = res.data.detail.fax;
           this.$forceUpdate();
         });
+      } else {
+        this.clientDetailList_respon = JSON.parse(
+          JSON.stringify(this.charge_list)
+        );
+        this.clientList = JSON.parse(JSON.stringify(this.cus_list));
+      }
     },
     handleSpan({ row, column, rowIndex, columnIndex }) {
       if (row.end) {
@@ -3402,23 +3458,68 @@ export default {
     },
     handleClientChargeChange(value) {
       if (value) {
-        this.info.custom_detail_name = value;
-        // 取出手机号码是该负责人的
-        this.clientDetailList_mobile = this.clientDetailList.filter(
-          (item) => item.service_name == this.info.custom_detail_name
-        );
-        // 赋值默认手机号码
-        this.info.custom_detail_mobile = this.clientDetailList_mobile[0].mobile;
-        // 去重手机号码
-        this.clientDetailList_mobile = this.unique(
-          this.clientDetailList_mobile
-        );
-        // 取出地址是该负责人的
-        this.clientDetailList_address = this.clientDetailList.filter(
-          (item) => item.service_name == this.info.custom_detail_name
+        // if (this.info.custom_id) {
+        //   this.info.custom_detail_name = value;
+        //   // 取出手机号码是该负责人的
+        //   this.clientDetailList_mobile = this.clientDetailList.filter(
+        //     (item) => item.service_name == this.info.custom_detail_name
+        //   );
+        //   // 赋值默认手机号码
+        //   this.info.custom_detail_mobile = this.clientDetailList_mobile[0].mobile;
+        //   // 去重手机号码
+        //   this.clientDetailList_mobile = this.unique(
+        //     this.clientDetailList_mobile
+        //   );
+        //   // 取出地址是该负责人的
+        //   this.clientDetailList_address = this.clientDetailList.filter(
+        //     (item) => item.service_name == this.info.custom_detail_name
+        //   );
+        //   // 赋值默认地址
+        //   this.info.custom_detail_id = this.clientDetailList_address[0].id || 0;
+        // } else {
+        this.axios
+          .get("/api/support_custom_for_service", {
+            params: { name: this.info.custom_detail_name },
+          })
+          .then((res) => {
+            this.clientList = res.data.data;
+            this.info.custom_id = res.data.data[0].id;
+            this.axios({
+              method: "get",
+              url: "/api/custom_detail",
+              params: { id: res.data.data[0].id },
+            }).then((re) => {
+              this.clientDetailList = re.data.list;
+              // 取出手机号码是该负责人的
+              this.clientDetailList_mobile = this.clientDetailList.filter(
+                (item) => item.service_name == value
+              );
+              // 赋值默认手机号码
+              this.info.custom_detail_mobile = this.clientDetailList_mobile[0].mobile;
+              // 去重手机号码
+              this.clientDetailList_mobile = this.unique(
+                this.clientDetailList_mobile
+              );
+              // 取出地址是该负责人的
+              this.clientDetailList_address = this.clientDetailList.filter(
+                (item) => item.service_name == value
+              );
+              // 赋值默认地址
+              this.info.custom_detail_id =
+                this.clientDetailList_address[0].id || 0;
+              this.info.service_id = re.data.detail.service_id;
+              this.fax = re.data.detail.fax;
+            });
+          });
+        // }
+      } else {
+        this.info.custom_detail_mobile = "";
+        this.info.custom_detail_id = "";
+        this.info.service_id = "";
+        this.clientDetailList_respon = JSON.parse(
+          JSON.stringify(this.charge_list)
         );
-        // 赋值默认地址
-        this.info.custom_detail_id = this.clientDetailList_respon[0].id || 0;
+        this.clientList = JSON.parse(JSON.stringify(this.cus_list));
       }
     },
     handleClientDetailChange(value) {
@@ -3768,13 +3869,17 @@ export default {
     handleTotalPriceCalc(row, item) {
       row.total_price = ((row.price || 0) * (row.num || 0)).toFixed(2);
       let sum1 = 0;
-      item.metalArray.forEach((element) => {
-        sum1 += element.total_price * 1 || 0;
-      });
+      item.metalArray &&
+        item.metalArray.length > 0 &&
+        item.metalArray.forEach((element) => {
+          sum1 += element.total_price * 1 || 0;
+        });
       let sum2 = 0;
-      item.extArray.forEach((element) => {
-        sum2 += element.total_price * 1 || 0;
-      });
+      item.extArray &&
+        item.extArray.length > 0 &&
+        item.extArray.forEach((element) => {
+          sum2 += element.total_price * 1 || 0;
+        });
       item.ext_price = sum1 * 1 + sum2 * 1;
       item.price =
         (item.unit_price * 1 || 0) * (item.num * 1 || 1) +
@@ -3795,6 +3900,7 @@ export default {
     },
     handlePartsDele(element, index, array) {
       array.splice(index, 1);
+      this.handleCalcCount();
       this.$forceUpdate();
     },
     handleProductPositionChange(item, e) {

+ 31 - 0
src/views/OrderMannage/BusinessOrderlist/list.vue

@@ -17,6 +17,14 @@
       :total="total"
     >
       <div slot="titleButton" style="display: flex">
+        <!-- v-if="persimissionData['批量导出'] || persimissionData.all" -->
+        <Button
+          @click="handleForceDele"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >强制删除</Button
+        >
         <Upload
           name="your_file"
           :show-upload-list="false"
@@ -100,6 +108,8 @@
       </template>
       <template slot="set" slot-scope="{ row }">
         <div>
+          <!-- v-if="persimissionData['收款'] || persimissionData.all" -->
+          <a @click="handleOrderCopy(row)" style="margin: 0 5px">拷贝</a>
           <a
             v-if="persimissionData['收款'] || persimissionData.all"
             @click="handleOpenCharge(row, '收款', '/api/orders_set_measure')"
@@ -1008,6 +1018,15 @@ export default {
           }
         });
     },
+    handleOrderCopy(row) {
+      this.axios
+        .post("/api/support_order_copy", { order_no: row.order_no })
+        .then((res) => {
+          if (res.code == 200) {
+            this.init(this.proxyObj);
+          }
+        });
+    },
     handleOpenCharge(row) {
       this.chargeModalForm.order_no = row.order_no;
       this.chargeModalForm.title = "";
@@ -1082,6 +1101,18 @@ export default {
         },
       });
     },
+    handleForceDele() {
+      if (this.selectIds && this.selectIds.length > 0) {
+        const p_list = this.selectIds.map((item) => {
+          return this.axios.post("/api/support_order_del", { order_no: item });
+        });
+        Promise.all(p_list).then((list) => {
+          this.init(this.proxyObj);
+        });
+      } else {
+        this.$Message.warning("请选择数据");
+      }
+    },
     async exportData() {
       const res = await this.axios("/api/orders_export", {
         params: { ...this.proxyObj },

+ 2 - 2
src/views/ProcessLine/index.vue

@@ -469,7 +469,7 @@ export default {
       this.loading = true;
       this.axios("/api/technological_route", { params: row }).then((res) => {
         if (res.code == 200) {
-          if (res.data.data.length == 0) {
+          if (res.data.data.length == 0 && this.proxyObj.page_index > 1) {
             this.proxyObj.page_index--;
             this.getData(this.proxyObj);
           }
@@ -621,7 +621,7 @@ export default {
   }
   .modal_content_right {
     width: 60%;
-    max-height: 600px;
+    max-height: 700px;
     padding-left: 10px;
     overflow: hidden;
     overflow-y: auto;

+ 39 - 34
src/views/ProcessRoute/edit.vue

@@ -10,7 +10,7 @@
     <div class="page-edit">
       <Form inline ref="Info" :model="info" :rules="rules">
         <FormItem label="ID">
-          <Input v-model="info.id" disabled placeholder="自动生成"></Input>
+          <Input v-model="info.id" disabled placeholder="自动生成" />
         </FormItem>
         <FormItem label="部件名称" prop="parts_id">
           <Select
@@ -34,7 +34,7 @@
             :disabled="type == 3"
             v-model="info.title"
             placeholder="请输入工艺组合名称"
-          ></Input>
+          />
         </FormItem>
         <FormItem label="价格" prop="price">
           <Input
@@ -42,10 +42,16 @@
             type="number"
             v-model="info.price"
             placeholder="请输入价格"
-          ></Input>
+          />
         </FormItem>
       </Form>
-
+      <!-- <span v-for="_item in partsList" :key="_item.id">
+        <span v-for="_id in info.parts_id" :key="_id">
+          <span v-show="_item.id == _id">
+            {{ _item.title }}
+          </span>
+        </span>
+      </span> -->
       <div class="hierarchy" v-for="item of info.list" :key="item.name">
         <span>{{ item.name || item.title }}(多选):</span>
         <div v-for="_item in item.cld" class="radio-g" :key="_item.type_title">
@@ -139,7 +145,7 @@
         <div>
           <span style="width: 100px">工艺路线名称: </span
           ><Input
-            v-model="info.title"
+            v-model="info.process_route_title"
             placeholder="请输入工艺路线名称"
             @on-change="handleProcessNameChange"
             size="small"
@@ -403,40 +409,37 @@ export default {
   methods: {
     handleProcessLineSet(row, index) {
       this.info.id = row.id;
-      this.info.title = row.title;
+      this.info.process_route_title = row.title;
       this.info.procedure_id = row.procedure_id;
       this.isNewProcess = false;
       this.selectTags = [];
       const arr = this.info.procedure_id
         ? this.info.procedure_id.split(",")
         : [];
-      for (const key in this.info.bps) {
-        const element = this.info.bps[key];
-        element.cld.forEach((z) => {
-          z.show = arr.includes(z.id + "");
-          if (arr.includes(z.id + "")) {
-            z.p_id && this.selectTags.push(z);
-          }
-          z.cld &&
-            z.cld.length > 0 &&
-            z.cld.forEach((elem) => {
-              elem.show = arr.includes(elem.id + "");
-              if (arr.includes(elem.id + "")) {
-                elem.p_id && this.selectTags.push(elem);
+      console.log("this.info.bps :>> ", this.info.bps);
+      for (let index = 0; index < arr.length; index++) {
+        const element = arr[index];
+        this.info.bps.map((lv1) => {
+          lv1.cld &&
+            lv1.cld.length > 0 &&
+            lv1.cld.map((lv2) => {
+              if (lv2.id == element) {
+                lv2.show = true;
+                lv2.p_id && this.selectTags.push(lv2);
               }
-              elem.cld &&
-                elem.cld.length > 0 &&
-                elem.cld.forEach((ele) => {
-                  ele.show = arr.includes(ele.id + "");
-                  if (arr.includes(ele.id + "")) {
-                    ele.p_id && this.selectTags.push(ele);
+              lv2.cld &&
+                lv2.cld.length > 0 &&
+                lv2.cld.map((lv3) => {
+                  if (lv3.id == element) {
+                    lv3.show = true;
+                    lv3.p_id && this.selectTags.push(lv3);
                   }
-                  ele.cld &&
-                    ele.cld.length > 0 &&
-                    ele.cld.forEach((el) => {
-                      el.show = arr.includes(el.id + "");
-                      if (arr.includes(el.id + "")) {
-                        el.p_id && this.selectTags.push(el);
+                  lv3.cld &&
+                    lv3.cld.length > 0 &&
+                    lv3.cld.map((lv4) => {
+                      if (lv4.id == element) {
+                        lv4.show = true;
+                        lv4.p_id && this.selectTags.push(lv4);
                       }
                     });
                 });
@@ -601,18 +604,20 @@ export default {
           url: "/api/technological_route_edit",
           data: {
             id: "",
-            title: this.info.title,
+            title: this.info.process_route_title,
             procedure_id: temparr.join(","),
           },
         }).then((res) => {
           if (res.code == 200) {
             // this.$Message.success(res.msg);
+            this.tableData = JSON.parse(JSON.stringify(this.selectTags));
+            this.process_name = this.info.process_route_title;
             this.show_add_detail = false;
           }
         });
       } else {
         this.tableData = JSON.parse(JSON.stringify(this.selectTags));
-        this.process_name = this.info.title;
+        this.process_name = this.info.process_route_title;
         this.show_add_detail = false;
       }
     },
@@ -748,7 +753,7 @@ export default {
   }
 }
 /deep/.ivu-modal-body {
-  height: 600px;
+  height: 700px;
   overflow: auto;
 }
 </style>

+ 16 - 1
src/views/ProcessRoute/index.vue

@@ -182,6 +182,13 @@ export default {
           serverName: "title",
           placeholder: "请输入工艺组合名称",
         },
+        {
+          title: "部件名称",
+          name: "Input",
+          value: "",
+          serverName: "part_title",
+          placeholder: "请输入部件名称",
+        },
       ],
       tableColums: [],
       tableData: [],
@@ -228,8 +235,12 @@ export default {
     },
     getData(row) {
       this.loading = true;
+      if (localStorage.getItem("process_route_sort")) {
+        this.sortList = JSON.parse(localStorage.getItem("process_route_sort"));
+        row.sortList = this.sortList;
+      }
       this.axios("/api/process_route_index", { params: row }).then((res) => {
-        if (res.data.detail.length == 0) {
+        if (res.data.detail.length == 0 && this.proxyObj.page_index > 1) {
           this.proxyObj.page_index--;
           this.getData(this.proxyObj);
         }
@@ -334,6 +345,10 @@ export default {
           params: { ...this.proxyObj, sortList: this.sortList },
         }).then((res) => {
           if (res.code == 200) {
+            localStorage.setItem(
+              "process_route_sort",
+              JSON.stringify(this.sortList)
+            );
             this.loading = false;
             // if (!res.data.data) {
             //   return this.$Message.error("列表数据返回格式不正确");

+ 1 - 0
src/views/ProductionOrderList/Dispatchlist/details.vue

@@ -54,6 +54,7 @@ export default {
                 {title:'贴标签零部件',align:'center',minWidth:150,key:'sub_part'},
                 {title:'工序分类',align:'center',minWidth:150,key:'basic_title'},
                 {title:'工序',align:'center',minWidth:150,key:'procedure_title'},
+                {title:'班组',align:'center',minWidth:150,key:'nickname'},
                 {title:'测量尺寸',align:'center',minWidth:150,key:'measure'},
                 {title:'单位',align:'center',minWidth:100,key:'company'},
                 {title:'芯片编号',align:'center',minWidth:150,key:'chip'},