mushencc преди 1 година
родител
ревизия
0e1715d765

+ 1 - 1
src/App.vue

@@ -8,7 +8,7 @@
 export default {
   name: 'App',
   beforeCreate(){
-    document.title = this.$store.state.ip=='http://121.41.102.225:82'?'九方测试服':this.$store.state.ip=='http://121.37.173.82:82'?'倍思特':this.$store.state.ip=='http://124.71.176.88:882'?'金立方':this.$store.state.ip=='http://124.71.176.88:70'?'森兰九鼎':this.$store.state.ip=='http://121.41.102.225:999'?'上线服务器':this.$store.state.ip=='http://hxy_api.qingyaokeji.com'?'华信源':'九方软件';
+    document.title = this.$store.state.ip=='http://121.41.102.225:82'?'九方测试服':this.$store.state.ip=='http://121.37.173.82:82'?'倍思特':this.$store.state.ip=='http://124.71.176.88:882'?'金立方':this.$store.state.ip=='http://124.71.176.88:70'?'森兰九鼎':this.$store.state.ip=='http://121.41.102.225:999'?'上线服务器':this.$store.state.ip=='http://hxyapi.qingyaokeji.com'?'华信源':'九方软件';
   }
 }
 </script>

+ 6 - 6
src/axios/index.js

@@ -1,11 +1,11 @@
 import axios from "axios";
 
 import Vue from "vue";
-
+let config;
 const instance = axios.create(config);
 
 // 3. 配置信息
-let config = {
+config = {
   // 每次请求的协议、IP地址。  设置该配置后,每次请求路径都可以使用相对路径,例如"/admin/login"
   // baseURL: "http://127.0.0.1:5590",
   // 请求超时时间
@@ -16,10 +16,10 @@ let config = {
 
 //请求拦截,后期可能会用到,先注册在此
 instance.interceptors.request.use(
-  function(config) {
-    if(config.url != '/api/bst_get_plan_time'&&config.url != '/api/total_area'){
+  function (config) {
+    if (config.url != '/api/bst_get_plan_time' && config.url != '/api/total_area') {
 
-    Vue.prototype.$loading.show();
+      Vue.prototype.$loading.show();
     }
     let token = localStorage.getItem("token");
     // let proxy_url = 'http://121.37.173.82:82'; //打包上线时请改用此处
@@ -31,7 +31,7 @@ instance.interceptors.request.use(
     config.headers["Authorization"] = token;
     return config;
   },
-  function(error) {
+  function (error) {
     // 对请求错误做些什么
     return Promise.reject(error);
   }

+ 64 - 57
src/components/Topsearch/index.vue

@@ -19,7 +19,7 @@
         :multiple="item.multiple"
         v-model="item.value"
         :type="item.type"
-        v-if="!item.isDate&&!item.isTooltip"
+        v-if="!item.isDate && !item.isTooltip"
         :style="item.width ? 'width:' + item.width + 'px' : ''"
         @on-change="item.change ? change($event, index) : ''"
       >
@@ -29,49 +29,52 @@
           :label="_item.label"
         ></Checkbox>
         <Option
-         v-for="(_item, _index) in item.option"
+          v-for="(_item, _index) in item.option"
           :key="_index"
           :label="item.optionName ? _item[item.optionName] : _item.label"
           :value="item.optionValue ? _item[item.optionValue] : _item.value"
         ></Option>
       </div>
-      <Tooltip v-if="item.isTooltip" transfer max-width='500' placement="right">
-         <div
-        :class="[
-          'margin',
-          item.name == 'Radio' || item.name == 'CheckboxGroup'
-            ? 'checkbox-item'
-            : '',
-        ]"
-        :key="index"
-        :is="item.name"
-        :size="item.size ? item.size : 'small'"
-        :placeholder="item.placeholder"
-        :clearable="!item.clearable ? true : false"
-        :disabled="item.disabled"
-        :filterable="item.filterable"
-        :multiple="item.multiple"
-        v-model="item.value"
-        :type="item.type"
-        :max-tag-count='1'
-        v-if="!item.isDate"
-        :style="item.width ? 'width:' + item.width + 'px' : ''"
-        @on-change="item.change ? change($event, index) : ''"
-      >
-      <Option v-if="!item.showChooseAll"
-      :label="item.chooseAll?'取消':'全选'"
-      value="全选"
-      @click.native="total_choose"
-      >
-      </Option>
-        <Option
-         v-for="(_item, _index) in item.option"
-          :key="_index"
-          :label="item.optionName ? _item[item.optionName] : _item.label"
-          :value="item.optionValue ? _item[item.optionValue] : _item.value"
-        ></Option>
-      </div>
-      <div slot="content">{{tooltip_data?tooltip_data:item.value.toString()}}</div>
+      <Tooltip v-if="item.isTooltip" transfer max-width="500" placement="right">
+        <div
+          :class="[
+            'margin',
+            item.name == 'Radio' || item.name == 'CheckboxGroup'
+              ? 'checkbox-item'
+              : '',
+          ]"
+          :key="index"
+          :is="item.name"
+          :size="item.size ? item.size : 'small'"
+          :placeholder="item.placeholder"
+          :clearable="!item.clearable ? true : false"
+          :disabled="item.disabled"
+          :filterable="item.filterable"
+          :multiple="item.multiple"
+          v-model="item.value"
+          :type="item.type"
+          :max-tag-count="1"
+          v-if="!item.isDate"
+          :style="item.width ? 'width:' + item.width + 'px' : ''"
+          @on-change="item.change ? change($event, index) : ''"
+        >
+          <Option
+            v-if="!item.showChooseAll"
+            :label="item.chooseAll ? '取消' : '全选'"
+            value="全选"
+            @click.native="total_choose"
+          >
+          </Option>
+          <Option
+            v-for="(_item, _index) in item.option"
+            :key="_index"
+            :label="item.optionName ? _item[item.optionName] : _item.label"
+            :value="item.optionValue ? _item[item.optionValue] : _item.value"
+          ></Option>
+        </div>
+        <div slot="content">
+          {{ tooltip_data ? tooltip_data : item.value.toString() }}
+        </div>
       </Tooltip>
       <div class="items" v-if="item.isDate">
         <DatePicker
@@ -91,18 +94,22 @@
         ></DatePicker>
       </div>
     </div>
-    <Button v-if="showbtn" @click="searchData" :type="btnType" :size="btn_size?btn_size:'small'">{{
-      btnName
-    }}</Button>
+    <Button
+      v-if="showbtn"
+      @click="searchData"
+      :type="btnType"
+      :size="btn_size ? btn_size : 'small'"
+      >{{ btnName }}</Button
+    >
   </div>
 </template>
 
 <script>
 export default {
   props: {
-    btn_size:{
-           type:String,
-           default:'default'
+    btn_size: {
+      type: String,
+      default: 'default'
     },
     list: {
       // type:Array,
@@ -120,8 +127,8 @@ export default {
       type: Boolean,
       default: true,
     },
-    tooltip_data:{
-      
+    tooltip_data: {
+
     }
   },
   data() {
@@ -130,19 +137,19 @@ export default {
   created() {
     window.addEventListener('keydown', this.handleKeyDown, true) //开启监听键盘按下事件
   },
-  destroyed(){
-    window.removeEventListener('keydown',this.handleKeyDown);
+  destroyed() {
+    window.removeEventListener('keydown', this.handleKeyDown);
   },
   mounted() {
     let obj = {}
     this.$emit('init', this.filterDats(obj))
   },
   methods: {
-    total_choose(){
-        this.$emit('total_choose', this.list)
+    total_choose() {
+      this.$emit('total_choose', this.list)
     },
-    change(e,index) {
-      this.$emit('changeSelected', this.list,e,index)
+    change(e, index) {
+      this.$emit('changeSelected', this.list, e, index)
     },
     searchData() {
       let obj = {}
@@ -153,7 +160,7 @@ export default {
     setDate(time) {
       let data = ''
       if (Object.prototype.toString.call(time) === '[object Date]') {
-        data = new Date(time).toLocaleDateString().replace(/\//g, '-')
+        data = new Date(time).toLocaleDateString()
       }
       return data
     },
@@ -164,11 +171,11 @@ export default {
           obj[v.end_server] = this.setDate(v.end_value)
         }
         if (Object.prototype.toString.call(v.value) === '[object Date]') {
-          v.value = new Date(time).toLocaleDateString().replace(/\//g, '-')
+          v.value = new Date(time).toLocaleDateString()
         }
         v.serverName
           ? (obj[v.serverName] =
-              typeof v.value === 'number' && v.value === 0 ? 0 : v.value)
+            typeof v.value === 'number' && v.value === 0 ? 0 : v.value)
           : ''
         if (v.value == 'null') {
           obj[v.serverName] = null
@@ -202,7 +209,7 @@ export default {
   display: inline-block;
 }
 .iten-title {
-  font-size:16px;
+  font-size: 16px;
   color: #333;
 }
 </style>

+ 85 - 78
src/components/currencyPage/index.vue

@@ -6,27 +6,24 @@
 
     <div class="page-edit">
       <div class="nav">
-        <Topsearch v-if="showTopSearch"
-                   :showbtn="showbtn"
-                   :btn_size='btn_size'
-                   @changeSelected="changeSelected"
-                   :list="list"
-                   @init="init"
-                   @searchData="searchData"
-                   :tooltip_data='tooltip_data'
-                   @total_choose='total_choose'
-                   >
+        <Topsearch
+          v-if="showTopSearch"
+          :showbtn="showbtn"
+          :btn_size="btn_size"
+          @changeSelected="changeSelected"
+          :list="list"
+          @init="init"
+          @searchData="searchData"
+          :tooltip_data="tooltip_data"
+          @total_choose="total_choose"
+        >
         </Topsearch>
         <div style="padding-bottom: 15px">
           <slot name="navButton"></slot>
         </div>
       </div>
-      <div v-if="logList"
-           slot="text-list"
-           class="log-list">
-        <div class="log-item"
-             v-for="(item, index) of logList"
-             :key="index">
+      <div v-if="logList" slot="text-list" class="log-list">
+        <div class="log-item" v-for="(item, index) of logList" :key="index">
           <span>{{ item.key }}:</span>
           <span :style="item.color ? 'color:' + item.color : ''">{{
             item.value
@@ -36,53 +33,48 @@
       <div>
         <slot name="text-list"></slot>
       </div>
-      <Table ref="table"
-             v-if="showTable"
-             :width="tableWidth"
-             :loading="loading"
-             :disabled-hover="disabledHover"
-             @on-selection-change="selectTable"
-             @on-select='select'
-             @on-select-cancel='selectTableCancel'
-             @on-select-all-cancel='selectTableAllCancel'
-             :stripe="stripe"
-             border
-             :size="size"
-             :columns="tableColums"
-             :data="tableData">
-        <template slot-scope="{ row }"
-                  slot="set">
-          <slot name="set"
-                :row="row"></slot>
+      <Table
+        ref="table"
+        v-if="showTable"
+        :width="tableWidth"
+        :loading="loading"
+        :disabled-hover="disabledHover"
+        @on-selection-change="selectTable"
+        @on-select="select"
+        @on-select-cancel="selectTableCancel"
+        @on-select-all-cancel="selectTableAllCancel"
+        :stripe="stripe"
+        border
+        :row-class-name="rowClassName"
+        :size="size"
+        :columns="tableColums"
+        :data="tableData"
+      >
+        <template slot-scope="{ row }" slot="set">
+          <slot name="set" :row="row"></slot>
         </template>
-        <template slot-scope="{ row }"
-                  slot="basicTypeSet">
-          <slot name="basicTypeSet"
-                :row="row"></slot>
+        <template slot-scope="{ row }" slot="basicTypeSet">
+          <slot name="basicTypeSet" :row="row"></slot>
         </template>
-         <template slot-scope="{ row,index }"
-                  slot="urlSet">
-          <slot name="urlSet"
-                :row="row"
-                :index='index'></slot>
+        <template slot-scope="{ row, index }" slot="urlSet">
+          <slot name="urlSet" :row="row" :index="index"></slot>
         </template>
-         <template slot-scope="{ row,index }"
-                  slot="fashion">
-          <slot name="fashion"
-                :row="row"
-                :index='index'></slot>
+        <template slot-scope="{ row, index }" slot="fashion">
+          <slot name="fashion" :row="row" :index="index"></slot>
         </template>
       </Table>
 
       <slot></slot>
     </div>
     <slot name="pageSlot"></slot>
-    <Footer v-if="showPage"
-            :pageIndex="pageIndex"
-            :total="total"
-            :pageSize="pageSize"
-            @changeSize="changeSize"
-            @change="changePage" />
+    <Footer
+      v-if="showPage"
+      :pageIndex="pageIndex"
+      :total="total"
+      :pageSize="pageSize"
+      @changeSize="changeSize"
+      @change="changePage"
+    />
   </div>
 </template>
 
@@ -94,12 +86,12 @@ export default {
       // type:Array,
       // default:null,
     },
-    btn_size:{
-         type:String,
+    btn_size: {
+      type: String,
     },
-    keep:{
-      type:Boolean,
-      default:false,
+    keep: {
+      type: Boolean,
+      default: false,
     },
     tableColums: {
       type: Array,
@@ -159,18 +151,21 @@ export default {
       type: Boolean,
       default: true,
     },
-    tooltip_data:{
+    tooltip_data: {
 
+    },
+    choose_index: {
+      default: []
     }
   },
-  data () {
+  data() {
     return {
       tableWidth: null,
       tableHeight: null,
     }
   },
-  created () { },
-  mounted () {
+  created() { },
+  mounted() {
     this.$nextTick(() => {
       if (this.showTable) {
         this.tableWidth = window.innerWidth - 350
@@ -204,42 +199,50 @@ export default {
       })
     }
   },
-  destroyed () {
+  destroyed() {
     window.removeEventListener('resize', (e) => {
       this.tableWidth = e.target.innerWidth - 350
     })
   },
   methods: {
     ...mapActions(['updata_permission']),
-    init (row) {
+    rowClassName(row, index) {
+      if (this.choose_index.find(v => v == index + 1)) {
+        return 'demo-table-info-row';
+      } else {
+        return '';
+      }
+
+    },
+    init(row) {
       this.$emit('init', row)
     },
-    searchData (row) {
+    searchData(row) {
       this.$emit('searchData', row)
     },
-    total_choose(e){
-       this.$emit('total_choose',e)
+    total_choose(e) {
+      this.$emit('total_choose', e)
     },
-    changePage (e) {
+    changePage(e) {
       this.$emit('changePage', e)
     },
-    selectTable (e) {
+    selectTable(e) {
       this.$emit('selectTable', e)
     },
-    changeSize (e) {
+    changeSize(e) {
       this.$emit('changeSize', e)
     },
-    changeSelected (e) {
+    changeSelected(e) {
       this.$emit('changeSelected', e)
     },
-    selectTableCancel(e,row){
-      this.$emit('selectTableCancel',e,row)
+    selectTableCancel(selection, row) {
+      this.$emit('selectTableCancel', selection, row)
     },
-    select(e,row){
-      this.$emit('select',e,row)
+    select(e, row) {
+      this.$emit('select', e, row)
     },
-    selectTableAllCancel(e){
-      this.$emit('selectTableAllCancel',e)
+    selectTableAllCancel(e) {
+      this.$emit('selectTableAllCancel', e)
     }
   },
 }
@@ -258,4 +261,8 @@ export default {
   top: 0px;
   height: 80%;
 }
+/deep/.ivu-table .demo-table-info-row td {
+  background-color: #63c1ed !important;
+  color: #fff;
+}
 </style>

+ 57 - 56
src/routerMap/index.js

@@ -63,7 +63,7 @@ const routerMap = [
     meta: {
       index: 2,
       NoPadding: true,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/Finance/productionCharts/index"], resolve),
@@ -327,7 +327,7 @@ const routerMap = [
     name: "checkUnusual", //生产订单列表-->出库表-->查看异常
     meta: {
       index: 4,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require([
@@ -361,7 +361,7 @@ const routerMap = [
     name: "DispatchlistList", //生产订单列表-->派工单
     meta: {
       index: 4,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/Dispatchlist/list"], resolve),
@@ -371,7 +371,7 @@ const routerMap = [
     name: "workOverList", //生产订单列表-->返工单
     meta: {
       index: 4,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/workOver/list"], resolve),
@@ -381,7 +381,7 @@ const routerMap = [
     name: "workOverListDetails", //生产订单列表-->返工单-->详情
     meta: {
       index: 4,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/workOver/details"], resolve),
@@ -466,7 +466,7 @@ const routerMap = [
     name: "bstProductionOrderList", //生产订单列表-->生产订单列表
     meta: {
       index: 4,
-      keepAlive:true,
+      keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/ProductionOrderList/ProductionsOrder/BST_list"], resolve),
@@ -573,7 +573,7 @@ const routerMap = [
     name: "Approvallist", //审批-->审批列表
     meta: {
       index: 4,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) => require(["@/views/Approval/list"], resolve),
   },
@@ -633,7 +633,7 @@ const routerMap = [
     name: "MountOrder", //安装订单
     meta: {
       index: 1,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) => require(["@/views/MountOrder/index"], resolve),
   },
@@ -699,7 +699,7 @@ const routerMap = [
     name: "ProjectProgressMannage", //项目进度列表
     meta: {
       index: 1,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/ProjectProgressMannage/list"], resolve),
@@ -718,7 +718,7 @@ const routerMap = [
     name: "ProjectProgressSummary", // 项目进度汇总表
     meta: {
       index: 1,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/ProjectProgressSummary/list"], resolve),
@@ -811,7 +811,7 @@ const routerMap = [
     name: "BidSystemDeepeningOrderNewEdit", // 深化单->新增,编辑,详情  7.8下沙
     meta: {
       index: 3,
-      keepAlive:true,
+      keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/BidSystem/DeepeningOrder/newEdit"], resolve),
@@ -1195,7 +1195,7 @@ const routerMap = [
     name: "extraCostsList", //采购模块-->项目杂费
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/PurchasingManage/extraCosts/list"], resolve),
@@ -1243,7 +1243,7 @@ const routerMap = [
     name: "ArrivalOrderList", //采购模块-->到货单列表
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/PurchasingManage/ArrivalOrder/list"], resolve),
@@ -1262,7 +1262,7 @@ const routerMap = [
     name: "QualitycontrolOrderList", //采购模块-->到货单列表
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/PurchasingManage/QualitycontrolOrder/list"], resolve),
@@ -1282,7 +1282,7 @@ const routerMap = [
     name: "InstockOrderList", //采购模块-->入库单列表
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/PurchasingManage/InstockOrder/list"], resolve),
@@ -1394,7 +1394,7 @@ const routerMap = [
     name: "ProductionInWarehouseList", //供应链管理-->生产入库列表
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/PurchasingManage/ProductionInWarehouse/list"], resolve),
@@ -1404,7 +1404,7 @@ const routerMap = [
     name: "DeliveryOutWarehouseList", //供应链管理-->发货出库列表
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/PurchasingManage/DeliveryOutWarehouse/list"], resolve),
@@ -1469,7 +1469,7 @@ const routerMap = [
     name: "stockingTable", // 仓库管理→库存台账
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/Warehouse/Warehouse/stockingTable"], resolve),
@@ -1573,7 +1573,7 @@ const routerMap = [
     name: "DispatchedList", // 分类派工→派工单查询
     meta: {
       index: 3,
-      keepAlive:true,
+      keepAlive: true,
     },
     component: (resolve) =>
       require(["@/views/Dispatching/DispatchedList"], resolve),
@@ -1803,7 +1803,7 @@ const routerMap = [
     name: "RoomListBST", //房间列表(倍思特)
     meta: {
       index: 3,
-      // keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/leadMatch/roomList/BSTlist"], resolve),
@@ -1871,6 +1871,7 @@ const routerMap = [
     name: "BSTWeightMemoList", //码单列表(倍思特)
     meta: {
       index: 3,
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/leadMatch/weightMemo/BSTlist"], resolve),
@@ -2580,7 +2581,7 @@ const routerMap = [
     name: "productValueList", //产值表
     meta: {
       index: 3,
-      keepAlive:true
+      keepAlive: true
     },
     component: (resolve) =>
       require(["@/views/ProductValue/list"], resolve),
@@ -2631,41 +2632,41 @@ const routerMap = [
       require(["@/views/stack/confirm"], resolve),
   },
   {
-         path:"/cms/ErrorList/index",
-         name:"ErrorListIndex",//异常预警表-->列表
-         meta:{
-          index:3,
-         },
-         component:(resolve)=>
-          require(["@/views/ErrorList/index"],resolve),
-      },
-      {
-        path:"/cms/ErrorList/detail",
-        name:"ErrorListDetail",//异常预警表-->列表-->详情
-        meta:{
-         index:3,
-        },
-        component:(resolve)=>
-         require(["@/views/ErrorList/detail"],resolve),
-     },
-     {
-      path:"/cms/BasicSettings/SearchWork",
-      name:"SearchWork",//查询派工单
-      meta:{
-       index:3,
-      },
-      component:(resolve)=>
-       require(["@/views/BasicSettings/SearchWork"],resolve),
-   },
-   {
-    path:"/cms/BasicSettings/MaterialRequisition",
-    name:"MaterialRequisition",//查询开料单
-    meta:{
-     index:3,
-    },
-    component:(resolve)=>
-     require(["@/views/BasicSettings/MaterialRequisition"],resolve),
- },
+    path: "/cms/ErrorList/index",
+    name: "ErrorListIndex",//异常预警表-->列表
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/ErrorList/index"], resolve),
+  },
+  {
+    path: "/cms/ErrorList/detail",
+    name: "ErrorListDetail",//异常预警表-->列表-->详情
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/ErrorList/detail"], resolve),
+  },
+  {
+    path: "/cms/BasicSettings/SearchWork",
+    name: "SearchWork",//查询派工单
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/BasicSettings/SearchWork"], resolve),
+  },
+  {
+    path: "/cms/BasicSettings/MaterialRequisition",
+    name: "MaterialRequisition",//查询开料单
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/BasicSettings/MaterialRequisition"], resolve),
+  },
   // 测试用
   {
     path: "/cms/ordermannage/businessorderlist/editcopy",

Файловите разлики са ограничени, защото са твърде много
+ 1579 - 1415
src/untils/until.js


Файловите разлики са ограничени, защото са твърде много
+ 709 - 502
src/views/Agreement/edit.vue


+ 106 - 87
src/views/BasicSettings/printStyle.vue

@@ -9,12 +9,12 @@
       <Topsearch :list="list" @init="init" @searchData="init"></Topsearch>
       <Table :columns="tableColumns" border :data="tableData">
         <template slot-scope="{ row }" slot="picture">
-            <img
-                  @click="looks(row.img_url)"
-                  :src="$store.state.ip + row.img_url"
-                  alt=""
-                  style="width:40px;height:auto"
-                />
+          <img
+            @click="looks(row.img_url)"
+            :src="$store.state.ip + row.img_url"
+            alt=""
+            style="width: 40px; height: auto"
+          />
         </template>
         <template slot="set" slot-scope="{ row }">
           <a style="margin-right: 10px" @click="forbidden(row)">{{
@@ -37,22 +37,41 @@
     />
     <Modal title="编辑" :width="450" v-model="showEdit" @on-ok="saveData">
       <Form :label-width="120">
-         <FormItem label="打印机品牌:">
-          <Select v-model="modalData.printer_brand" filterable clearable @on-change='changePrintBrand'>
+        <FormItem label="打印机品牌:">
+          <Select
+            v-model="modalData.printer_brand"
+            filterable
+            clearable
+            @on-change="changePrintBrand"
+          >
             <Option value="POSTEK">POSTEK</Option>
             <Option value="灵天智能">灵天智能</Option>
           </Select>
         </FormItem>
-        <FormItem label="打印机名称:" v-if="print_style==0">
-          <Select v-model="modalData.printerUsbPort" filterable clearable :disabled='order_no_disable' > 
-            <Option v-for="(item,index) in Print_order_no_list" :key="index" :label="item.printerName" :value="item.printerUsbPort"></Option>
+        <FormItem label="打印机名称:" v-if="print_style == 0">
+          <Select
+            v-model="modalData.printerUsbPort"
+            filterable
+            clearable
+            :disabled="order_no_disable"
+          >
+            <Option
+              v-for="(item, index) in Print_order_no_list"
+              :key="index"
+              :label="item.printerName"
+              :value="item.printerUsbPort"
+            ></Option>
           </Select>
         </FormItem>
         <FormItem label="打印机端口号:" v-else>
           <!-- <Select v-model="modalData.printerUsbPort" filterable clearable :disabled='order_no_disable' > 
             <Option v-for="(item,index) in Print_order_no_list" :key="index" :label="item.printerName" :value="item.printerUsbPort"></Option>
           </Select> -->
-          <Input v-model="modalData.printerUsbPort" clearable :disabled='order_no_disable'></Input>
+          <Input
+            v-model="modalData.printerUsbPort"
+            clearable
+            :disabled="order_no_disable"
+          ></Input>
         </FormItem>
         <FormItem label="分类:">
           <Select v-model="modalData.type" filterable clearable>
@@ -110,9 +129,9 @@ import $ from "jquery";
 export default {
   data() {
     return {
-      print_style:0,
-      Print_order_no_list:[],
-      order_no_disable:true,
+      print_style: 0,
+      Print_order_no_list: [],
+      order_no_disable: true,
       modalData: {},
       showEdit: false,
       stateData: {},
@@ -181,39 +200,40 @@ export default {
     };
   },
   methods: {
-    changePrintBrand(e){
-         if(e === 'POSTEK'){
-           this.print_style = 0;
-           this.axios.get("/api/get_print_url").then((res) => {
-             let url = `http://${res.data.request_url}:888/postek/print`; //request_url
-             let _this = this;
-              $.ajax({
-          type: "post",
-          url,
-          data: {reqParam:'printerList'},
-          dataType: "json",
-          timeout: 5000,
-          success: function(result) {
+    changePrintBrand(e) {
+      if (e === 'POSTEK') {
+        this.print_style = 0;
+        this.axios.get("/api/get_print_url").then((res) => {
+          let url = `http://${res.data.request_url}:888/postek/print`; //request_url
+          let _this = this;
+          $.ajax({
+            type: "post",
+            url,
+            data: { reqParam: 'printerList' },
+            dataType: "json",
+            timeout: 5000,
+            success: function (result) {
 
-            if (result.retval == "0") {
-              _this.$Message.success("发送成功");
-              _this.order_no_disable = false;
-             _this.Print_order_no_list=result.printerList;
-            } else {
-              _this.$Message.error("发送失败,返回结果:" + result.msg);
-            }
-          },
-          error: function() {
-             _this.$Message.error("未连接此类型打印机");
+              if (result.retval == "0") {
+                _this.$Message.success("发送成功");
+                _this.order_no_disable = false;
+                _this.Print_order_no_list = result.printerList;
+                _this.modalData.printerUsbPort = result.printerList[0].printerUsbPort;
+              } else {
+                _this.$Message.error("发送失败,返回结果:" + result.msg);
+              }
+            },
+            error: function () {
+              _this.$Message.error("未连接此类型打印机");
               _this.order_no_disable = true;
-          },
-        });
-           })
-         }else if(e==='灵天智能'){
-           this.print_style =1;
-         }
+            },
+          });
+        })
+      } else if (e === '灵天智能') {
+        this.print_style = 1;
+      }
     },
-       looks(img) {
+    looks(img) {
       const array = [{ img_url: img }];
       this.$previewImg({
         list: array,
@@ -222,15 +242,15 @@ export default {
         baseTitleField: "",
       });
     },
-     delItems() {
-     this.modalData.img_url = '';
+    delItems() {
+      this.modalData.img_url = '';
     },
-     changeIpt(e, row) {
+    changeIpt(e, row) {
       let file = e.target.files[0];
       this.postImg(file, row);
       e.target.value = null;
     },
-     postImg(file,row) {
+    postImg(file, row) {
       let formData = new FormData();
       formData.append("file", file);
       this.axios.post("/api/upload_pic", formData).then((res) => {
@@ -253,38 +273,38 @@ export default {
       this.modalData = JSON.parse(JSON.stringify(row));
       console.log(this.modalData);
       this.modalData.state = this.modalData.state == 0 ? "禁用" : "启用";
-  if(this.modalData.printer_brand){
-    this.order_no_disable = true;
-     if(this.modalData.printer_brand==='POSTEK'){
-       this.print_style = 0;
-           this.axios.get("/api/get_print_url").then((res) => {
-             let url = `http://${res.data.request_url}:888/postek/print`; //request_url
-             let _this = this;
-              $.ajax({
-          type: "post",
-          url,
-          data: {reqParam:'printerList'},
-          dataType: "json",
-          timeout: 5000,
-          success: function(result) {
+      if (this.modalData.printer_brand) {
+        this.order_no_disable = true;
+        if (this.modalData.printer_brand === 'POSTEK') {
+          this.print_style = 0;
+          this.axios.get("/api/get_print_url").then((res) => {
+            let url = `http://${res.data.request_url}:888/postek/print`; //request_url
+            let _this = this;
+            $.ajax({
+              type: "post",
+              url,
+              data: { reqParam: 'printerList' },
+              dataType: "json",
+              timeout: 5000,
+              success: function (result) {
 
-            if (result.retval == "0") {
-             _this.Print_order_no_list=result.printerList;
-             _this.order_no_disable = false;
-            } else {
-              _this.$Message.error("发送失败,返回结果:" + result.msg);
-            }
-          },
-          error: function() {
-             _this.$Message.error('未连接打印机,不能获取端口号')
-          },
-        });
-           })
-         }else if(this.modalData.printer_brand==='灵天智能'){
-           this.order_no_disable = false;
-             this.print_style = 1;
-         }
-  }
+                if (result.retval == "0") {
+                  _this.Print_order_no_list = result.printerList;
+                  _this.order_no_disable = false;
+                } else {
+                  _this.$Message.error("发送失败,返回结果:" + result.msg);
+                }
+              },
+              error: function () {
+                _this.$Message.error('未连接打印机,不能获取端口号')
+              },
+            });
+          })
+        } else if (this.modalData.printer_brand === '灵天智能') {
+          this.order_no_disable = false;
+          this.print_style = 1;
+        }
+      }
       this.showEdit = true;
     },
     forbidden(row) {
@@ -295,8 +315,8 @@ export default {
           type: row.type,
           title: row.title,
           img_url: row.img_url,
-          printer_brand:row.printer_brand,
-          printerUsbPort:row.printerUsbPort
+          printer_brand: row.printer_brand,
+          printerUsbPort: row.printerUsbPort
         })
         .then((res) => {
           if (res.code == 200) {
@@ -384,10 +404,9 @@ export default {
     }
   }
   .delete-img {
-  position: absolute;
-  right: 5px;
-  top: 5px;
- 
-}
+    position: absolute;
+    right: 5px;
+    top: 5px;
+  }
 }
 </style>

+ 215 - 196
src/views/BidSystem/OutputValue/otherList.vue

@@ -1,26 +1,45 @@
 <template>
-  <div style="width:100%">
+  <div style="width: 100%">
     <Toptitle title="产值表">
-      <Button type="primary" ghost style="margin-right: 10px" @click='exportData()'>导出</Button>
-    </Toptitle>
-    <div style="height:90%;overflow:auto">
-    <Topsearch :list="list"  @searchData="searchVal"> </Topsearch>
-    <div class="table_content" >
-        <div  v-for="(item, index) in tableData" :key="index" class="table_style" >
-        <div class="table_title">{{item.title}}</div>
-      <Table
-        :data="item.data"
-        :columns="tableColumns"
-        border
-        max-height='614'
-          show-summary 
-    :summary-method="handleSummary"
+      <Button
+        type="primary"
+        ghost
+        style="margin-right: 10px"
+        @click="exportData()"
+        >导出</Button
       >
-      </Table>
+    </Toptitle>
+    <div style="height: 90%; overflow: auto">
+      <!-- <Form style="display:flex;flex-wrap:wrap;margin-top:10px">
+      <FormItem label='班组:'>
+        <Select filterable></Select>
+      </FormItem>
+      <FormItem label='日期:'></FormItem>
+      <FormItem label='项目名称:'></FormItem>
+      <FormItem label='图号:'></FormItem> 
+      <FormItem :label-width='40'></FormItem>
+    </Form> -->
+      <Topsearch :list="list" @searchData="searchVal"> </Topsearch>
+      <div class="table_content">
+        <div
+          v-for="(item, index) in tableData"
+          :key="index"
+          class="table_style"
+        >
+          <div class="table_title">{{ item.title }}</div>
+          <Table
+            :data="item.data"
+            :columns="tableColumns"
+            border
+            max-height="614"
+            show-summary
+            :summary-method="handleSummary"
+          >
+          </Table>
+        </div>
       </div>
     </div>
-    </div>
-     <!-- <div class="pageSlotStyle">
+    <!-- <div class="pageSlotStyle">
           <Page
             :page-size-opts="[10, 20, 30, 50, 100, 1000]"
             @on-page-size-change="changeSize"
@@ -38,25 +57,25 @@
 export default {
   data() {
     return {
-      searchState:false,
-        proxyData:{},
-        total:0,
-        pageSize:10,
-        pageIndex:1,
+      searchState: false,
+      proxyData: {},
+      total: 0,
+      pageSize: 10,
+      pageIndex: 1,
       tableData: [],
-      tableColumns:[   
-      {title:'日期',align:'center',width:'120',key:'end_time'},
-      {title:'项目名称',align:'center',width:'100',key:'residential_name',ellipsis:true,tooltip:true},
-      {title:'图号',align:'center',width:'80',key:'url_number',ellipsis:true,tooltip:true},
-      {title:'平方',align:'center',width:'100',key:'area',ellipsis:true,tooltip:true},
-      {title:'人数',align:'center',width:'80',key:'count'},
-     ],
+      tableColumns: [
+        { title: '日期', align: 'center', width: '120', key: 'end_time' },
+        { title: '项目名称', align: 'center', width: '100', key: 'residential_name', ellipsis: true, tooltip: true },
+        { title: '图号', align: 'center', width: '80', key: 'url_number', ellipsis: true, tooltip: true },
+        { title: '平方', align: 'center', width: '100', key: 'area', ellipsis: true, tooltip: true },
+        { title: '人数', align: 'center', width: '80', key: 'count' },
+      ],
       list: [
         {
           title: "班组",
           name: "Select",
-          isTooltip:true,
-          showChooseAll:true,
+          isTooltip: true,
+          showChooseAll: true,
           value: "",
           multiple: true,
           filterable: true,
@@ -67,22 +86,22 @@ export default {
           option: [],
         },
         {
-            title:'日期',
-            isDate:true,
-            name:"Date",
-            type:'date',
-            start_value:`${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-1`,
-            end_value:['1','3','5','7','8','10','12'].indexOf((new Date()).toLocaleDateString().split('/')[1])>=0?`${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-31`:['4','6','9','11'].indexOf((new Date()).toLocaleDateString().split('/')[1])>=0?`${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-30`:`${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-${((new Date()).toLocaleDateString().split('/')[0])%4==0?29:28}`,
-            start_server: "start_time",
-            end_server:'end_time',
-            start_placeholder:'年/月',
-            end_placeholder:'年/月'
+          title: '日期',
+          isDate: true,
+          name: "Date",
+          type: 'date',
+          start_value: `${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-1`,
+          end_value: ['1', '3', '5', '7', '8', '10', '12'].indexOf((new Date()).toLocaleDateString().split('/')[1]) >= 0 ? `${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-31` : ['4', '6', '9', '11'].indexOf((new Date()).toLocaleDateString().split('/')[1]) >= 0 ? `${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-30` : `${(new Date()).toLocaleDateString().split('/')[0]}-${(new Date()).toLocaleDateString().split('/')[1]}-${((new Date()).toLocaleDateString().split('/')[0]) % 4 == 0 ? 29 : 28}`,
+          start_server: "start_time",
+          end_server: 'end_time',
+          start_placeholder: '年/月/日',
+          end_placeholder: '年/月/日'
         },
         {
           title: "项目名称",
           name: "Select",
-          isTooltip:true,
-          showChooseAll:true,
+          isTooltip: true,
+          showChooseAll: true,
           value: "",
           multiple: true,
           filterable: true,
@@ -92,11 +111,11 @@ export default {
           optionValue: "value",
           option: [],
         },
-         {
+        {
           title: "图号",
           name: "Select",
-          isTooltip:true,
-          showChooseAll:true,
+          isTooltip: true,
+          showChooseAll: true,
           value: "",
           multiple: true,
           filterable: true,
@@ -118,88 +137,89 @@ export default {
   //       }
   // },
   mounted() {
-    this.axios.post('/api/team_list').then(res=>{
-       this.proxyData.employee = res.data.data;
+    this.axios.post('/api/team_list').then(res => {
+      this.proxyData.employee = res.data.data;
       let employee = [];
-         res.data.data.forEach(v=>{
-           let obj ={};
-           obj.label = v;
-           obj.value=v;
-           employee.push(obj);
-         })
-         this.list[0].option = employee;
-          let residential_name = [];
-          res.data.residential_name.forEach(v=>{
-               let obj = {};
-               obj.label = v;
-               obj.value = v;
-               residential_name.push(obj)
-          })
-          this.list[2].option = residential_name;
-          let url_number = [];
-          res.data.url_number.forEach(v=>{
-                let obj = {};
-               obj.label = v;
-               obj.value = v;
-               url_number.push(obj)
-          })
-          this.list[3].option = url_number;
+      res.data.data.forEach(v => {
+        let obj = {};
+        obj.label = v;
+        obj.value = v;
+        employee.push(obj);
+      })
+      this.list[0].option = employee;
+      let residential_name = [];
+      res.data.residential_name.forEach(v => {
+        let obj = {};
+        obj.label = v;
+        obj.value = v;
+        residential_name.push(obj)
+      })
+      this.list[2].option = residential_name;
+      let url_number = [];
+      res.data.url_number.forEach(v => {
+        let obj = {};
+        obj.label = v;
+        obj.value = v;
+        url_number.push(obj)
+      })
+      this.list[3].option = url_number;
     })
   },
   methods: {
-     handleSummary ({ columns, data }) {
-                const sums = {};
-                columns.forEach((column, index) => {
-                    const key = column.key;
-                    if (index === 0) {
-                        sums[key] = {
-                            key,
-                            value: '合计'
-                        };
-                        return;
-                    }
-                    const values = data.map(item => Number(item[key]));
-                    if (key === 'area') {
-                        const v = values.reduce((prev, curr) => {
-                            const value = Number(curr);
-                            if (!isNaN(value)) {
-                                return prev + curr;
-                            } else {
-                                return prev;
-                            }
-                        }, 0);
-                        sums[key] = {
-                            key,
-                            value:v.toFixed(2)
-                        };
-                    } else {
-                        sums[key] = {
-                            key,
-                            value: ''
-                        };
-                    }
-                });
+    handleSummary({ columns, data }) {
+      const sums = {};
+      columns.forEach((column, index) => {
+        const key = column.key;
+        if (index === 0) {
+          sums[key] = {
+            key,
+            value: '合计'
+          };
+          return;
+        }
+        const values = data.map(item => Number(item[key]));
+        if (key === 'area') {
+          const v = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[key] = {
+            key,
+            value: v.toFixed(2)
+          };
+        } else {
+          sums[key] = {
+            key,
+            value: ''
+          };
+        }
+      });
 
-                return sums;
-        },
-     searchVal(row){
-         if(this.searchState){
-           return
-         }else{
-           this.searchState = true;
-           this.search(row);
-           
-         }
-     },
-      // changeSize(e){
-      //   console.log(1)
-      //      this.pageSize = e;
-      //      this.search(this.proxyData);
-      // },
-      // changePage(e){
-      //     this.pageIndex = e;
-      //     this.search(this.proxyData);
-      // },
+      return sums;
+    },
+    searchVal(row) {
+
+      if (this.searchState) {
+        return
+      } else {
+        this.searchState = true;
+        this.search(row);
+
+      }
+    },
+    // changeSize(e){
+    //   console.log(1)
+    //      this.pageSize = e;
+    //      this.search(this.proxyData);
+    // },
+    // changePage(e){
+    //     this.pageIndex = e;
+    //     this.search(this.proxyData);
+    // },
     // init(row) {
     //       if(row){
     //           this.proxyData = JSON.parse(JSON.stringify(row))
@@ -227,52 +247,53 @@ export default {
     //     })
     //   });
     // },
-    async exportData(){
-            const res = await this.axios.post('/api/output_value_export',{...this.proxyData})
-           if(res.code == 200){
-                let url = `${this.$store.state.ip}/api/storage/${res.data.file}`
-                location.href = url
-            }
-        },
-   async search(row){
-      
-         if(row){
-             console.log(row)
-              row.start_time=row.start_time.indexOf('-')>=0?Date.parse(row.start_time).toString().slice(0,10):row.start_time;
-              row.end_time = row.end_time.indexOf('-')>=0?Date.parse(row.end_time).toString().slice(0,10):row.end_time;
-               this.proxyData = JSON.parse(JSON.stringify(row))
-               if(this.proxyData.employee.length==0){
-               this.proxyData.employee = [];
-               row.employee =[];
-               this.list[0].option.forEach(v=>{
-                 this.proxyData.employee.push(v.value);
-                 row.employee.push(v.value);
-               })}
-          }
-         this.tableData = [];
-        // this.total = 0;
-       
-      row.employee.forEach(async (v)=>{
-           await this.axios.post("/api/outputs_value_list",{start_time:row.start_time,end_time:row.end_time,employee:v,url_number:row.url_number,residential_name:row.residential_name}).then(res=>{
-            //  if(res.data.total>this.total){
-            //    this.total = res.data.total;
-            //  }
-             this.$nextTick(()=>{
-                if(res.data.data.length<12){
-                for(let i=0;i<12;i++){
-                    if(res.data.data.length<12){
-                        res.data.data.push({});
-                    }else{
-                        break;
-                    }
+    async exportData() {
+      const res = await this.axios.post('/api/output_value_export', { ...this.proxyData })
+      if (res.code == 200) {
+        let url = `${this.$store.state.ip}/api/storage/${res.data.file}`
+        location.href = url
+      }
+    },
+    async search(row) {
+
+      if (row) {
+        console.log(row)
+        row.start_time = row.start_time.indexOf('/') >= 0 ? Date.parse(row.start_time).toString().slice(0, 10) : Date.parse(`${(new Date()).toLocaleDateString().split('/')[0]}/${(new Date()).toLocaleDateString().split('/')[1]}/1`).toString().slice(0, 10);
+        row.end_time = row.end_time.indexOf('/') >= 0 ? Date.parse(row.end_time).toString().slice(0, 10) : Date.parse(['1', '3', '5', '7', '8', '10', '12'].indexOf((new Date()).toLocaleDateString().split('/')[1]) >= 0 ? `${(new Date()).toLocaleDateString().split('/')[0]}/${(new Date()).toLocaleDateString().split('/')[1]}/31` : ['4', '6', '9', '11'].indexOf((new Date()).toLocaleDateString().split('/')[1]) >= 0 ? `${(new Date()).toLocaleDateString().split('/')[0]}/${(new Date()).toLocaleDateString().split('/')[1]}/30` : `${(new Date()).toLocaleDateString().split('/')[0]}/${(new Date()).toLocaleDateString().split('/')[1]}/${((new Date()).toLocaleDateString().split('/')[0]) % 4 == 0 ? 29 : 28}`).toString().slice(0, 10);
+        this.proxyData = JSON.parse(JSON.stringify(row))
+        if (this.proxyData.employee.length == 0) {
+          this.proxyData.employee = [];
+          row.employee = [];
+          this.list[0].option.forEach(v => {
+            this.proxyData.employee.push(v.value);
+            row.employee.push(v.value);
+          })
+        }
+      }
+      this.tableData = [];
+      // this.total = 0;
+
+      row.employee.forEach(async (v) => {
+        await this.axios.post("/api/outputs_value_list", { start_time: row.start_time, end_time: row.end_time, employee: v, url_number: row.url_number, residential_name: row.residential_name }).then(res => {
+          //  if(res.data.total>this.total){
+          //    this.total = res.data.total;
+          //  }
+          this.$nextTick(() => {
+            if (res.data.data.length < 12) {
+              for (let i = 0; i < 12; i++) {
+                if (res.data.data.length < 12) {
+                  res.data.data.push({});
+                } else {
+                  break;
                 }
+              }
             }
-             })
-           
-               this.tableData.push(res.data);
-               this.searchState = false;
-            // this.tableData.sort(this.sort);
-            })
+          })
+
+          this.tableData.push(res.data);
+          this.searchState = false;
+          // this.tableData.sort(this.sort);
+        })
       })
       // this.tableData.forEach(v=>{
       //    if(v.length<this.total){
@@ -285,39 +306,37 @@ export default {
       //           }
       //       }
       // })
-    // this.$forceUpdate();
-      
+      // this.$forceUpdate();
+
+    },
+    sort(a, b) {
+
+      return a.index - b.index
     },
-      sort(a,b){
-        
-       return a.index-b.index
-      },
   },
 };
 </script>
 <style lang="scss" scoped>
-.table_content{
-    vertical-align: top;
-    overflow-y: hidden;
-    overflow-x: auto;
-    white-space: nowrap;
-    height: 710px;
-    width:100%;
-    .table_title{
-        text-align: center;
-        font-size: 18px;
-        font-weight: bold;
-        border-top:#dcdee2 solid 2px;
-        border-left:#dcdee2 solid 2px; 
-        border-right: #dcdee2 solid 2px;;
-    }
-    .table_style{
-        display: inline-block;
-        width:492px;
-        
-    }
-  
-}  
+.table_content {
+  vertical-align: top;
+  overflow-y: hidden;
+  overflow-x: auto;
+  white-space: nowrap;
+  height: 710px;
+  width: 100%;
+  .table_title {
+    text-align: center;
+    font-size: 18px;
+    font-weight: bold;
+    border-top: #dcdee2 solid 2px;
+    border-left: #dcdee2 solid 2px;
+    border-right: #dcdee2 solid 2px;
+  }
+  .table_style {
+    display: inline-block;
+    width: 492px;
+  }
+}
 .pageSlotStyle {
   text-align: center;
   margin-top: 10px;

Файловите разлики са ограничени, защото са твърде много
+ 358 - 368
src/views/ChipPrintScreen/ChipPrintScreen.vue


Файловите разлики са ограничени, защото са твърде много
+ 479 - 353
src/views/Dispatching/Dispatching.vue


+ 80 - 68
src/views/ProductionOrderList/Deliverylist/DeliveryDetail.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <FullPage
-      :title=" '发货单详情'"
+      :title="'发货单详情'"
       :list="list"
       @init="init"
       :logList="logList"
@@ -9,6 +9,7 @@
       @searchData="init"
       @changePage="changePage"
       @changeSize="changeSize"
+      :choose_index="chooseIndex"
       @selectTable="selectTable"
       :tableColums="tableColums"
       :tableData="tableData"
@@ -16,22 +17,17 @@
       :total="total"
     >
       <div slot="titleButton">
-         <Button
-          @click="exportContent"
-          type="primary"
-        
-         
-          style="margin-right: 10px"
+        <Button @click="exportContent" type="primary" style="margin-right: 10px"
           >导出</Button
-        > 
+        >
         <Button
           v-if="$route.query.type == 2"
           @click="handleOrderReturn(selects)"
           type="primary"
-          style="margin-right:10px;"
+          style="margin-right: 10px"
           >撤销发货</Button
         >
-        <Button @click="back" type="primary" ghost style="margin-right:10px;"
+        <Button @click="back" type="primary" ghost style="margin-right: 10px"
           >返回</Button
         >
         <Button
@@ -39,21 +35,21 @@
           @click="exportData"
           type="warning"
           ghost
-          style="margin-right:10px;"
+          style="margin-right: 10px"
           >待出库清单打印</Button
         >
-         <Button
+        <Button
           @click="outShip(selects, 1)"
           type="warning"
           ghost
-          style="margin-right:10px;"
+          style="margin-right: 10px"
           >批量发货完成</Button
         >
         <Button
           @click="outShip(selects, 2)"
           type="success"
           ghost
-          style="margin-right:10px;"
+          style="margin-right: 10px"
           >批量收货完成</Button
         >
       </div>
@@ -87,12 +83,17 @@
         <a
           class="map-margin"
           @click="outShip([row.orders_procedure_id], 1)"
-          v-show="row.in_out_value==0"
-          > 发货完成 </a
+          v-show="row.in_out_value == 0"
+        >
+          发货完成 </a
         ><a
           class="map-margin"
-          v-show='row.transportation_value==0&&row.in_out_value==1'
-          @click="row.in_out_value == 1?outShip([row.orders_procedure_id], 2):$Message.warning('请先确认发货')"
+          v-show="row.transportation_value == 0 && row.in_out_value == 1"
+          @click="
+            row.in_out_value == 1
+              ? outShip([row.orders_procedure_id], 2)
+              : $Message.warning('请先确认发货')
+          "
           >收货完成</a
         >
       </template>
@@ -145,6 +146,7 @@ import { mapActions } from "vuex";
 export default {
   data() {
     return {
+      chooseIndex: [],
       list: [
         {
           title: "楼幢",
@@ -201,51 +203,52 @@ export default {
           serverName: "url_number",
           placeholder: "请选择图号",
           value: "",
-          multiple:true,
-          filterable:true,
+          multiple: true,
+          filterable: true,
           option: [],
         },
         {
           title: "部件",
           name: "Select",
           serverName: "part",
-           filterable: true,
+          filterable: true,
           placeholder: "请选择部件",
           value: "",
           option: [],
         },
-         {
-            title: "发货状态",
-            name: "Select",
-            serverName: "in_out_value",
-            value: "",
-            option: [
-              { label: "已发货", value: 1 },
-              { label: "未发货", value: 0 },
-            ],
-          },
-           {
-            title: "收货状态",
-            name: "Select",
-            serverName: "transportation_value",
-            value: "",
-            option: [
-              { label: "已收货", value: 1 },
-              { label: "未收货", value: 0 },
-            ],
-          },
-          {
-            title:'图号批量查询:',
-            value:"",
-            name:'Input',
-            serverName:'url_numbers',
-            placeholder:'请输入',
-            clearable:false,
-          }
+        {
+          title: "发货状态",
+          name: "Select",
+          serverName: "in_out_value",
+          value: "",
+          option: [
+            { label: "已发货", value: 1 },
+            { label: "未发货", value: 0 },
+          ],
+        },
+        {
+          title: "收货状态",
+          name: "Select",
+          serverName: "transportation_value",
+          value: "",
+          option: [
+            { label: "已收货", value: 1 },
+            { label: "未收货", value: 0 },
+          ],
+        },
+        {
+          title: '图号批量查询:',
+          value: "",
+          name: 'Input',
+          serverName: 'url_numbers',
+          placeholder: '请输入',
+          clearable: false,
+        }
       ],
       logList: [],
       tableColums: [
-        { type: "selection", align: "center", width: "100", fixed: "left" },
+        { type: "selection", align: "center", width: "90", fixed: "left" },
+        { type: 'index', align: 'center', width: '80', fixed: 'left', title: '序号' },
         {
           title: "房间号",
           align: "center",
@@ -255,7 +258,7 @@ export default {
             const { row } = params;
             return h(
               "span",
-              `${row.house?`${row.house}-`:''}${row.unit?`${row.unit}-`:''}${row.layer?`${row.layer}-`:''}${row.number_detail}`
+              `${row.house ? `${row.house}-` : ''}${row.unit ? `${row.unit}-` : ''}${row.layer ? `${row.layer}-` : ''}${row.number_detail}`
             );
           },
         },
@@ -268,7 +271,7 @@ export default {
         { title: "图号", align: "center", minWidth: 200, key: "url_number" },
         { title: "组合名称", align: "center", minWidth: 200, key: "compose_name" },
         { title: "部件", align: "center", minWidth: 200, key: "part_title" },
-        {title:'精裁尺寸',align:'center',minWidth:150,key:'measure'},
+        { title: '精裁尺寸', align: 'center', minWidth: 150, key: 'measure' },
         {
           title: "零部件",
           align: "center",
@@ -290,7 +293,7 @@ export default {
                 : '已发货'
             ),
         },
-         {
+        {
           title: "收货状态",
           align: "center",
           minWidth: 200,
@@ -347,20 +350,20 @@ export default {
   methods: {
     async exportContent() {
       const res = await this.axios("/api/transport_export", {
-        params: { transport_no:this.$route.query.transport_no },
+        params: { transport_no: this.$route.query.transport_no },
       });
       if (res.code == 200) {
-      
+
         let url = `${this.$store.state.ip}/api/storage/${res.data.file}`;
         location.href = url;
       }
     },
-      outDelivery(row){
-         this.info.order_in_no = Array.isArray(row)
+    outDelivery(row) {
+      this.info.order_in_no = Array.isArray(row)
         ? row.join(",")
         : row.order_in_no;
       this.showStock = true;
-      },
+    },
     init(row) {
       this.axios("/api/user").then((res) => (this.users = res.data.data));
       this.pageIndex = 1;
@@ -393,7 +396,7 @@ export default {
         params: {
           order_no: this.$route.query.order_no,
           type: this.$route.query.type,
-          transport_no:this.$route.query.transport_no
+          transport_no: this.$route.query.transport_no
         },
       }).then((res) => {
         res.data.house.map((v) => {
@@ -440,12 +443,14 @@ export default {
       });
     },
     changePage(e) {
+      this.chooseIndex = [];
       this.pageIndex = e;
       this.proxyObj.page_index = e;
       this.getData(this.proxyObj);
     },
     changeSize(e) {
       this.pageSize = e;
+      this.chooseIndex = [];
       this.proxyObj.page_size = this.pageSize;
       this.getData(this.proxyObj);
     },
@@ -479,16 +484,23 @@ export default {
             }
           });
         },
-        onCancel: () => {},
+        onCancel: () => { },
       });
     },
     selectTable(row) {
+      this.chooseIndex = [];
+      console.log(row);
+      this.tableData.forEach((v, index) => {
+        if (row.find(c => (c.pr_id == v.pr_id))) {
+          this.chooseIndex.push(index + 1);
+        }
+      })
+      console.log(this.chooseIndex);
       this.selectedReturnArr = row;
-        this.selects = [];
+      this.selects = [];
       row.forEach(v => {
         this.selects.push(v.orders_procedure_id)
       });
-      console.log(this.selects)
     },
     confirmSuccess(row) {
       let params = "";
@@ -562,17 +574,17 @@ export default {
                 }
               });
           },
-          cancel: (e) => {},
+          cancel: (e) => { },
         });
       } else {
         if (!row || row.length < 1) {
           return this.$Message.error("请至少选择一项");
         }
-        if(type == 2){
-          let arr = this.selectedReturnArr.filter(v=>{
-            return v.in_out_value==0
+        if (type == 2) {
+          let arr = this.selectedReturnArr.filter(v => {
+            return v.in_out_value == 0
           });
-          if(arr.length>0){
+          if (arr.length > 0) {
             return this.$Message.warning('有未发货的数据不能收货')
           }
         }
@@ -594,7 +606,7 @@ export default {
               }
             });
           },
-          cancel: (e) => {},
+          cancel: (e) => { },
         });
       }
     },

Файловите разлики са ограничени, защото са твърде много
+ 416 - 339
src/views/ProductionOrderList/InboundForm/details.vue


+ 166 - 168
src/views/ProductionOrderList/ProductionPlanlist/BST_two.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="height:100%">
+  <div style="height: 100%">
     <FullPage
       title="生产排产列表"
       :list="set_list"
@@ -8,12 +8,12 @@
       @selectTable="selectTable"
       @changePage="changePage"
       @changeSize="changeSize"
-      @changeSelected='tooltip_change'
-      @total_choose='total_choose'
+      @changeSelected="tooltip_change"
+      @total_choose="total_choose"
       :tableColums="computedTable"
       :tableData="tableData"
       :showPage="false"
-      :tooltip_data='tooltip_data'
+      :tooltip_data="tooltip_data"
       :page_index="page_index"
       :loading="loading"
       :total="total"
@@ -22,7 +22,7 @@
         <Button
           v-if="persimissionData['分类派工'] || persimissionData.all"
           type="primary"
-          style="margin-right:10px"
+          style="margin-right: 10px"
           @click="handleDispatchType(selects)"
           ghost
           >批量派工</Button
@@ -61,7 +61,7 @@
         <div>
           <a
             v-if="persimissionData['详情'] || persimissionData.all"
-            style="margin:0 5px"
+            style="margin: 0 5px"
             @click="goDetail(row)"
             >详情</a
           >
@@ -72,7 +72,7 @@
             >派工单</a
           > -->
         </div>
-      </template> 
+      </template>
       <template slot="pageSlot">
         <div class="pageSlotStyle">
           <Page
@@ -88,7 +88,7 @@
         </div>
       </template>
     </FullPage>
-     <Modal
+    <Modal
       v-model="showModal"
       title="设置"
       @on-ok="handleModalOk"
@@ -128,12 +128,12 @@ import { mapState } from "vuex";
 export default {
   data() {
     return {
-      setTableColumns:[],
-      url_number:[],
-      tooltip_data:'',
+      setTableColumns: [],
+      url_number: [],
+      tooltip_data: '',
       loading: true,
-      url_number_list:[],
-        tableModalColumns: [
+      url_number_list: [],
+      tableModalColumns: [
         {
           title: "是否展示",
           align: "center",
@@ -189,7 +189,7 @@ export default {
           },
         },
       ],
-        tableModalTableData: [
+      tableModalTableData: [
         { is_show: true, key: "selection", value: "全选", title: "全选" },
         {
           is_show: true,
@@ -267,7 +267,7 @@ export default {
         },
         { is_show: true, key: "set", value: "操作", title: "操作" },
       ],
-       formModalColumns: [
+      formModalColumns: [
         {
           title: "是否展示",
           align: "center",
@@ -380,8 +380,9 @@ export default {
           key: "residential_name",
           minWidth: 200,
         },
-         { title: "图号", align: "center", key: "url_number", minWidth: 200,ellipsis:'true',tooltip:'true'
-          },
+        {
+          title: "图号", align: "center", key: "url_number", minWidth: 200, ellipsis: 'true', tooltip: 'true'
+        },
         { title: "计划单号", align: "center", key: "plan_no", minWidth: 200 },
         // {
         //   title: "订单类型",
@@ -394,9 +395,9 @@ export default {
         // },
       ],
       tableData: [],
-      showModal:false,
+      showModal: false,
       page_index: 1,
-      currencyPageId:null,
+      currencyPageId: null,
       page_size: 10,
       total: 0,
       proxyObj: {},
@@ -408,7 +409,7 @@ export default {
     };
   },
   // beforeRouteEnter(to, from, next) {
-   
+
   //     if (from.path == "/cms/productionorderlist/productionplanlist/details"||from.path=='/cms/Dispatching/Dispatching') {
   //       next(vm=>{
   //            vm.proxyObj = JSON.parse(localStorage.getItem('proxyObj'));
@@ -434,16 +435,16 @@ export default {
   //   next((vm) => {});
   // },
   created() {
-     this.axios.post("/api/orders_produce_plan_list", {page_size:this.page_size,page_index:this.page_index}).then(
-        (res) => {
-         let data =[];
-          res.data.url_number_list.map(v=>{
-           let obj={};
-           obj.title =v;
-           data.push(obj)
-          })
-          this.url_number_list = data;
-          })
+    this.axios.post("/api/orders_produce_plan_list", { page_size: this.page_size, page_index: this.page_index }).then(
+      (res) => {
+        let data = [];
+        res.data.url_number_list.map(v => {
+          let obj = {};
+          obj.title = v;
+          data.push(obj)
+        })
+        this.url_number_list = data;
+      })
     // 获取紧急程度
     this.axios.get("/api/warning_list").then((res) => {
       this.warningList = res.data.data;
@@ -458,73 +459,73 @@ export default {
     ...mapState(["persimissionData"]),
     computedTable() {
       // if (this.tableheaders.length < 1) {
-      return [...this.tableColums,...this.setTableColumns, 
-       {
-          title: "订单状态",
-          align: "center",
-          key: "state",
-          minWidth: 150,
-          render: (h, params) =>
-            h(
-              "span",
-              {},
-              params.row.state == 0
-                ? "未派工"
-                : params.row.state == 1
+      return [...this.tableColums, ...this.setTableColumns,
+      {
+        title: "订单状态",
+        align: "center",
+        key: "state",
+        minWidth: 150,
+        render: (h, params) =>
+          h(
+            "span",
+            {},
+            params.row.state == 0
+              ? "未派工"
+              : params.row.state == 1
                 ? "派工中"
                 : params.row.state == 2
-                ? "完成"
-                : ""
-            ),
-        },
-        // { title: "业务员", align: "center", key: "nickname", minWidth: 150 },
-        {
-          title: "紧急程度",
-          align: "center",
-          key: "warning_state",
-          minWidth: 150,
-          slot: "basicTypeSet",
-        },
-        {
-          title: "计划开始时间",
-          align: "center",
-          minWidth: 200,
-          key: "plan_start_time",
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDate(params.row.plan_start_time, 1)),
-        },
-        {
-          title: "计划结束时间",
-          align: "center",
-          minWidth: 200,
-          key: "plan_end_time",
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDate(params.row.plan_end_time, 1)),
-        },
-        {
-          title: "生产进度",
-          align: "center",
-          key: "complete_rate",
-          minWidth: 100,
-          render: (h, params) =>
-            h("span", {}, parseInt(params.row.complete_rate * 100) + "%"),
-        },
-        {
-          title: "预估交付日期",
-          align: "center",
-          key: "predict_time",
-          minWidth: 200,
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDate(params.row.predict_time, 1)),
-        },
+                  ? "完成"
+                  : ""
+          ),
+      },
+      // { title: "业务员", align: "center", key: "nickname", minWidth: 150 },
       {
-          title: "操作",
-          align: "center",
-          key: "set",
-          slot: "set",
-          fixed: "right",
-          width: "150",
-        }]
+        title: "紧急程度",
+        align: "center",
+        key: "warning_state",
+        minWidth: 150,
+        slot: "basicTypeSet",
+      },
+      {
+        title: "计划开始时间",
+        align: "center",
+        minWidth: 200,
+        key: "plan_start_time",
+        render: (h, params) =>
+          h("span", {}, this.func.replaceDate(params.row.plan_start_time, 1)),
+      },
+      {
+        title: "计划结束时间",
+        align: "center",
+        minWidth: 200,
+        key: "plan_end_time",
+        render: (h, params) =>
+          h("span", {}, this.func.replaceDate(params.row.plan_end_time, 1)),
+      },
+      {
+        title: "生产进度",
+        align: "center",
+        key: "complete_rate",
+        minWidth: 100,
+        render: (h, params) =>
+          h("span", {}, parseInt(params.row.complete_rate * 100) + "%"),
+      },
+      {
+        title: "预估交付日期",
+        align: "center",
+        key: "predict_time",
+        minWidth: 200,
+        render: (h, params) =>
+          h("span", {}, this.func.replaceDate(params.row.predict_time, 1)),
+      },
+      {
+        title: "操作",
+        align: "center",
+        key: "set",
+        slot: "set",
+        fixed: "right",
+        width: "150",
+      }]
       // }
       // return this.func.computedHeader(this.tableheaders, this.tableColums)
     },
@@ -546,9 +547,9 @@ export default {
         },
         {
           title: "图号",
-          isTooltip:true,
-          width:'160',
-          change:true,
+          isTooltip: true,
+          width: '160',
+          change: true,
           name: "Select",
           serverName: "url_number",
           placeholder: "请选择",
@@ -556,7 +557,7 @@ export default {
           optionName: "title",
           optionValue: "title",
           option: this.url_number_list,
-          multiple:true
+          multiple: true
         },
         // {
         //   title: "订单类型",
@@ -621,42 +622,43 @@ export default {
           ],
         },
         {
-          title:'图号批量查询',
-          name:'Input',
-          serverName:'url_numbers',
-          value:'',
-          clearable:false,
-          placeholder:'请输入'
+          title: '图号批量查询',
+          name: 'Input',
+          serverName: 'url_numbers',
+          value: '',
+          clearable: false,
+          placeholder: '请输入'
         },
-         {title:'批次',
-        name:'Input',
-        clearable:false,
-        serverName:'numbers',
-        placeholder:'请输入'
+        {
+          title: '批次',
+          name: 'Input',
+          clearable: false,
+          serverName: 'numbers',
+          placeholder: '请输入'
         }
       ];
     },
   },
   methods: {
-    total_choose(e){
-      let data=[];
-     if(e[2].value.indexOf('全选')>=0){
-        e[2].option.forEach(v=>{
+    total_choose(e) {
+      let data = [];
+      if (e[2].value.indexOf('全选') >= 0) {
+        e[2].option.forEach(v => {
           data.push(v.title)
         })
         data.unshift('全选')
-         this.set_list[2].value = data;
+        this.set_list[2].value = data;
         this.url_number = data;
-     }else{
-       this.set_list[2].value = [];
-       this.url_number = [];
-     }
+      } else {
+        this.set_list[2].value = [];
+        this.url_number = [];
+      }
     },
-    tooltip_change(e){
-          this.tooltip_data = e[2].value.toString();
+    tooltip_change(e) {
+      this.tooltip_data = e[2].value.toString();
     },
-    handleModalOk(){
-        this.formModalTableData.forEach((element, index) => {
+    handleModalOk() {
+      this.formModalTableData.forEach((element, index) => {
         element.sort = index;
       });
       this.tableModalTableData.forEach((element, index) => {
@@ -687,19 +689,19 @@ export default {
       //       this.getData(this.proxyObj);
       // }else{
       row.sub_state = 5;
-        this.page_index = 1;
-        row.page_index = this.page_index;
-        row.page_size = this.page_size;
-        this.proxyObj = row;
-        this.getData(row);
+      this.page_index = 1;
+      row.page_index = this.page_index;
+      row.page_size = this.page_size;
+      this.proxyObj = row;
+      this.getData(row);
       // }
     },
     searchData(row) {
-        this.page_index = 1;
-        row.page_index = this.page_index;
-        row.page_size = this.page_size;
-        this.proxyObj = row;
-        this.getData(row);
+      this.page_index = 1;
+      row.page_index = this.page_index;
+      row.page_size = this.page_size;
+      this.proxyObj = row;
+      this.getData(row);
     },
     changePage(e) {
       this.page_index = e;
@@ -717,21 +719,21 @@ export default {
         (res) => {
           this.tableData = res.data.data;
           let header = [];
-          if(res.data.header&&res.data.header.length!=0){
-              res.data.header.forEach(v=>{
-                let obj = {};
-                obj.title = `${v.title}状态`;
-                obj.align = 'center';
-                obj.minWidth = 120;
-                obj.key = v.key;
-                obj.render = (h,params)=>{
-                  const {row} = params;
-                  return h('span',{},row[v.key]==0?'未派工':row[v.key]==1?'派工中':'已派工')
-                }
-                header.push(obj);
-          })
+          if (res.data.header && res.data.header.length != 0) {
+            res.data.header.forEach(v => {
+              let obj = {};
+              obj.title = `${v.title}状态`;
+              obj.align = 'center';
+              obj.minWidth = 120;
+              obj.key = v.key;
+              obj.render = (h, params) => {
+                const { row } = params;
+                return h('span', {}, row[v.key] == 0 ? '未派工' : row[v.key] == 1 ? '派工中' : '已派工')
+              }
+              header.push(obj);
+            })
           }
-        
+
           this.setTableColumns = header;
           this.total = res.data.total;
           // this.tableheaders = res.data.tableSet || []
@@ -749,7 +751,7 @@ export default {
         },
       });
     },
-     onDragDrop(a, b, table, type) {
+    onDragDrop(a, b, table, type) {
       if (type == 2 && (a == 0 || b == 0)) {
         return this.$Message.warning("全选位置不可变");
       }
@@ -757,18 +759,14 @@ export default {
     },
     handleDispatchType(row) {
       // console.log("row :>> ", row);
-      this.axios.post('/api/order_produce_list').then(res=>{
-        if(res.code == 200){
-             this.$router.push({
-        path: "/cms/Dispatching/Dispatching",
-        query: {
-          order_no: row.order_no,
-          plan_no: row.plan_no,
-        },
-      });
+      this.axios.get('/api/frock_list').then(res => {
+        if (res.code == 200) {
+          this.$router.push({
+            path: "/cms/Dispatching/Dispatching",
+          });
         }
       })
-     
+
     },
     dispatchList(row) {
       this.dispatchOrder({
@@ -784,7 +782,7 @@ export default {
       this.selects = result;
     },
     setupTableHeader() {
-       this.showModal = true;
+      this.showModal = true;
       return;
       // this.tableheaders.length < 1
       //   ? (this.tableheaders = this.tableColums.reduce(
@@ -802,17 +800,17 @@ export default {
       //       .then((res) => {
       //         if (res.code == 200) {
       //           this.$Message.success(res.msg);
-                // let data =[];
-                // for(let i = 0 ; i++ ; i<this.tableColums){
-                //   if(this.tableColums[i].title.indexOf(result)>=0){
-                //              data.push(this.tableColums[i])
-                //   }
-                // }
-                // this.computedTable = data
-       //       }
+      // let data =[];
+      // for(let i = 0 ; i++ ; i<this.tableColums){
+      //   if(this.tableColums[i].title.indexOf(result)>=0){
+      //              data.push(this.tableColums[i])
+      //   }
+      // }
+      // this.computedTable = data
+      //       }
       //      });
-     //   },
-    //  });
+      //   },
+      //  });
     },
   },
 };

+ 60 - 60
src/views/cms.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="content">
-    <Header @handleTitleClick="handleTitleClick" ref="header"/>
+    <Header @handleTitleClick="handleTitleClick" ref="header" />
     <div class="page">
-      <div class="navigation" v-show="navgationData.length!=0">
+      <div class="navigation" v-show="navgationData.length != 0">
         <Navgation :navgationData="navgationData" @menuSelect="menuSelect" />
       </div>
 
-      <div :class="navgationData.length!=0?'router-map':'router-none'">
-        <Crumbs :crumbs="crumbs" v-show="navgationData.length!=0"/>
+      <div :class="navgationData.length != 0 ? 'router-map' : 'router-none'">
+        <Crumbs :crumbs="crumbs" v-show="navgationData.length != 0" />
         <transition :name="transitionName">
           <keep-alive>
             <router-view
@@ -46,7 +46,7 @@ import { mapState, mapMutations, mapActions } from "vuex";
 export default {
   data() {
     return {
-      w_arr:[],
+      w_arr: [],
       transitionName: "slide-left",
       // navgationData:[]
     };
@@ -64,29 +64,29 @@ export default {
   },
   created() {
     this.undata_side_navData();
-     if(!sessionStorage.getItem('open-menu')){
-       console.log(1)
-        this.axios({ method: "get", url: "/api/menu" }).then((res) => {
+    if (!sessionStorage.getItem('open-menu')) {
+      console.log(1)
+      this.axios({ method: "get", url: "/api/menu" }).then((res) => {
         this.w_arr = res.data;
-      // this.undata_navData();
-       this.handleTitleClick(this.w_arr[0]) 
-    });
-    
-       
-     }
+        // this.undata_navData();
+        this.handleTitleClick(this.w_arr[0])
+      });
+
+
+    }
   },
-//   beforeRouteEnter(to, from, next){
-//     next();
-//      if(!sessionStorage.getItem('open-menu')){
-//        console.log(1)
-//        let arr = [];
-//         this.axios({ method: "get", url: "/api/menu" }).then((res) => {
-//         arr = res.data;
-//       // this.undata_navData();
-//     });
-//         this.handleTitleClick(arr[0]) 
-//      }
-//  },
+  //   beforeRouteEnter(to, from, next){
+  //     next();
+  //      if(!sessionStorage.getItem('open-menu')){
+  //        console.log(1)
+  //        let arr = [];
+  //         this.axios({ method: "get", url: "/api/menu" }).then((res) => {
+  //         arr = res.data;
+  //       // this.undata_navData();
+  //     });
+  //         this.handleTitleClick(arr[0]) 
+  //      }
+  //  },
   mounted() {
     if (sessionStorage.getItem("crumbs")) {
       let data = JSON.parse(sessionStorage.getItem("crumbs"));
@@ -106,7 +106,7 @@ export default {
         this.$store.commit("updateCrumbs", { s });
         sessionStorage.setItem(
           "crumbs",
-          JSON.stringify({ parantData, childData, lastChild })
+          JSON.stringify({ parantData: s, childData: {}, lastChild: {} })
         );
         return this.$router.push({
           path: data[name].page,
@@ -158,56 +158,56 @@ export default {
       let page = nextEndChild
         ? nextEndChild.page
         : endChild
-        ? endChild.page
-        : lastChild
-        ? lastChild.page
-        : childData.page;
+          ? endChild.page
+          : lastChild
+            ? lastChild.page
+            : childData.page;
       let title = nextEndChild
         ? nextEndChild.title
         : endChild
-        ? endChild.title
-        : lastChild
-        ? lastChild.title
-        : childData.title;
-         let version = nextEndChild
+          ? endChild.title
+          : lastChild
+            ? lastChild.title
+            : childData.title;
+      let version = nextEndChild
         ? nextEndChild.version
         : endChild
-        ? endChild.version
-        : lastChild
-        ? lastChild.version
-        : childData.version;
+          ? endChild.version
+          : lastChild
+            ? lastChild.version
+            : childData.version;
       let id = nextEndChild
         ? nextEndChild.id
         : endChild
-        ? endChild.id
-        : lastChild
-        ? lastChild.id
-        : childData.id || "";
+          ? endChild.id
+          : lastChild
+            ? lastChild.id
+            : childData.id || "";
       this.$router.push({
         path: page,
         query: {
           title: title,
           id: id,
           permisssions_id: permisssions_id,
-          version:version,
+          version: version,
         },
       });
     },
     handleTitleClick(row) {
-    if(row.type==1){
-          this.$router.push({path:row.page});
-          this.$store.commit("updataNavgation", row.sub);
-      sessionStorage.setItem("navgation", JSON.stringify(row.sub));
-    }else{
-      this.$store.commit("updataNavgation", row.sub);
-      sessionStorage.setItem("navgation", JSON.stringify(row.sub));
-      // if (row.title == '首页') {
-      this.$router.push({ path: "/cms/home", query: { title: "首页" } });
-      // } else {
-      // }
-    }
+      if (row.type == 1) {
+        this.$router.push({ path: row.page });
+        this.$store.commit("updataNavgation", row.sub);
+        sessionStorage.setItem("navgation", JSON.stringify(row.sub));
+      } else {
+        this.$store.commit("updataNavgation", row.sub);
+        sessionStorage.setItem("navgation", JSON.stringify(row.sub));
+        // if (row.title == '首页') {
+        this.$router.push({ path: "/cms/home", query: { title: "首页" } });
+        // } else {
+        // }
+      }
     }
-      
+
   },
   components: { Header, Navgation, Crumbs },
 };
@@ -243,8 +243,8 @@ export default {
       padding: 0;
     }
   }
-  .router-none{
-     width: calc(100%);
+  .router-none {
+    width: calc(100%);
     height: 100%;
     padding: 10px 20px;
     background: #f0f1f4;

+ 113 - 119
src/views/leadMatch/roomList/BSTlist.vue

@@ -15,27 +15,33 @@
           padding-top: 10px;
         "
       >
-        <Button type="primary" size="small" style="margin-right: 10px" @click="gotoPage(3)"
+        <Button
+          type="primary"
+          size="small"
+          style="margin-right: 10px"
+          @click="gotoPage(3)"
           >新增</Button
         >
       </div>
       <Table :columns="tableColumns" border :data="tableData">
-        <template slot="make_data" slot-scope="{row}">
-          <span>{{func.replaceDateNoHMS(row.crt_time)}}</span>
+        <template slot="make_data" slot-scope="{ row }">
+          <span>{{ func.replaceDateNoHMS(row.crt_time) }}</span>
         </template>
-     </Table>
+      </Table>
+    </div>
+    <div class="content_body_page">
+      <Page
+        :page-size-opts="[10, 20, 30, 40, 100]"
+        @on-page-size-change="changeSize"
+        @on-change="changePage"
+        :current="pageIndex"
+        show-total
+        show-elevator
+        :total="total"
+        show-sizer
+        :page-size="pageSize"
+      />
     </div>
-      <div class="content_body_page">
-          <Page :page-size-opts="[10, 20, 30, 40,100]"
-                @on-page-size-change='changeSize'
-                @on-change='changePage'
-                :current='pageIndex'
-                show-total
-                show-elevator
-                :total="total"
-                show-sizer
-                :page-size='pageSize' />
-        </div>
   </div>
 </template>
 <script>
@@ -78,148 +84,136 @@ export default {
         // },
       ],
       tableColumns: [
-        { title: "项目编码", key: "project_number", align: "center", resizable: true,
-                        width: 350},
-        { title: "项目名称", key: "project_name", align: "center", resizable: true,
-                        width: 350},
-        { title: "项目简称", key: "abbreviation", align: "center",resizable: true,
-                        width: 350},
+        {
+          title: "项目编码", key: "project_number", align: "center", resizable: true,
+          width: 350
+        },
+        {
+          title: "项目名称", key: "project_name", align: "center", resizable: true,
+          width: 350
+        },
+        {
+          title: "项目简称", key: "abbreviation", align: "center", resizable: true,
+          width: 350
+        },
         // { title: "匹配状态", key: "state", align: "center", minWidth: 140 ,
         // render:(h,params)=>{
         //   return h('span',{},params.row.state===0?'未匹配':params.row.state===2?'匹配完成':'匹配中')
         // }},
-        { title: "制单日期", key: "make_data", align: "center", resizable: true,
-                        width: 350 ,slot:"make_data"},
-        { title: "操作", key:'',align: "center", minWidth: 150 , 
-         render: (h, params) => {
-                            return h('div', [
-                                h('a', { style: {
-                                        marginRight: '5px'
-                                    }, on: {
-                                        click: () => {
-                                            this.gotoPage(1,params.row)
-                                        }
-                                    }
-                                    }, '编辑'),
-                                h('a', { style: {
-                                        marginRight: '5px'
-                                    }, on: {
-                                        click: () => {
-                                            this.gotoPage(2,params.row)
-                                        }
-                                    }
-                                    }, '查看'),
-                                h('a',{ style: {
-                                        marginRight: '5px'
-                                    }, on: {
-                                        click: () => {
-                                            this.del(params.row)
-                                        }
-                                    }},'删除')
-                            ]);
-                        }},
+        {
+          title: "制单日期", key: "make_data", align: "center", resizable: true,
+          width: 350, slot: "make_data"
+        },
+        {
+          title: "操作", key: '', align: "center", minWidth: 150,
+          render: (h, params) => {
+            return h('div', [
+              h('a', {
+                style: {
+                  marginRight: '5px'
+                }, on: {
+                  click: () => {
+                    this.gotoPage(1, params.row)
+                  }
+                }
+              }, '编辑'),
+              h('a', {
+                style: {
+                  marginRight: '5px'
+                }, on: {
+                  click: () => {
+                    this.gotoPage(2, params.row)
+                  }
+                }
+              }, '查看'),
+              h('a', {
+                style: {
+                  marginRight: '5px'
+                }, on: {
+                  click: () => {
+                    this.del(params.row)
+                  }
+                }
+              }, '删除')
+            ]);
+          }
+        },
       ],
       tableData: [],
-      pageIndex: JSON.parse(localStorage.getItem("pageIndex")) || 1,
-      pageSize: JSON.parse(localStorage.getItem("pageSize")) || 10,
+      pageIndex: 1,
+      pageSize: 10,
       total: 0,
+      proxyData: {},
     };
   },
   mounted() {
-    if (localStorage.getItem("list")) {
-      this.list = JSON.parse(localStorage.getItem("list"));
-    }
-    if (localStorage.getItem("searchList")) {
-      this.$nextTick(() => {
-        this.initData(JSON.parse(localStorage.getItem("searchList")));
-      });
-    }
+    this.initData();
   },
   methods: {
-    searchData(){
+    searchData(row) {
       this.pageIndex = 1;
       this.pageSize = 10;
-      let row = {};
-      this.list.forEach((e) => {
-        if (e.serverName == "project_number") {
-          this.$set(row, "project_number", e.value);
-        }
-        if (e.serverName == "project_name") {
-          this.$set(row, "project_name", e.value);
-        }
-        if (e.serverName == "abbreviation") {
-          this.$set(row, "abbreviation", e.value);
-        }
-        // this.$set(对象, key, 数组);
-      });
-      localStorage.setItem("searchList", JSON.stringify(row));
+      this.proxyData = JSON.parse(JSON.stringify(row));
       this.initData(row);
     },
     initData(row) {
       console.log(row)
-      this.axios.get('/api/cut_order_list',{params:{
-        page_index:this.pageIndex,
-        page_size:this.pageSize,
-        order_type:2,
-        ...row
-        }}).then(res=>{
+      this.axios.get('/api/cut_order_list', {
+        params: {
+          page_index: this.pageIndex,
+          page_size: this.pageSize,
+          order_type: 2,
+          ...row
+        }
+      }).then(res => {
         this.tableData = res.data.data;
         this.total = res.data.total;
       })
     },
-    del(row){
-           this.confirmDelete({
-                content:'是否删除?',
-                title:'房间删除',
-                type:'primary',
-                then:()=>{
-                      this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:2}).then(()=>{
-            this.initData()
+    del(row) {
+      this.confirmDelete({
+        content: '是否删除?',
+        title: '房间删除',
+        type: 'primary',
+        then: () => {
+          this.axios.post('/api/cut_order_delete', { cut_order_id: row.id, order_type: 2 }).then(() => {
+            this.initData(this.proxyData);
           })
-                },
-                cancel:()=>{}
-            })
-         
+        },
+        cancel: () => { }
+      })
+
     },
-    gotoPage(type,row){
-      localStorage.setItem("list", JSON.stringify(this.list));
-      localStorage.setItem("pageSize", this.pageSize);
-      localStorage.setItem("pageIndex", this.pageIndex);
+    gotoPage(type, row) {
       //1 编辑 2 查看 3 新增
-      switch(type){
+      switch (type) {
         case 1:
-          case 2:this.$router.push({ path: '/cms/leadMatch/roomList/BSTedit', query: { type:type,cut_order_id:row.id} });
+        case 2: this.$router.push({ path: '/cms/leadMatch/roomList/BSTedit', query: { type: type, cut_order_id: row.id } });
           break
-          case 3:this.$router.push({ path: '/cms/leadMatch/roomList/BSTedit', query: { type:type} });
+        case 3: this.$router.push({ path: '/cms/leadMatch/roomList/BSTedit', query: { type: type } });
           break
       }
     },
-    changeSize (e) {
+    changeSize(e) {
       this.pageSize = e;
-        if (localStorage.getItem("searchList")) {
-        this.initData(JSON.parse(localStorage.getItem("searchList")));
-      }else{
-        this.initData()
-      } 
+      this.pageIndex = 1;
+      this.initData(this.proxyData)
+
     },
-     changePage (e) {
+    changePage(e) {
       this.pageIndex = e;
-        if (localStorage.getItem("searchList")) {
-        this.initData(JSON.parse(localStorage.getItem("searchList")));
-      }else{
-        this.initData()
-      } 
+      this.initData(this.proxyData)
     },
   },
 };
 </script>
 <style scoped lang='scss'>
-.weight_memo_content{
-    height: 80%;
-    overflow: auto;
+.weight_memo_content {
+  height: 80%;
+  overflow: auto;
 }
-.content_body_page{
-    margin-top: 10px;
-    text-align: center;
+.content_body_page {
+  margin-top: 10px;
+  text-align: center;
 }
 </style>

+ 113 - 101
src/views/leadMatch/weightMemo/BSTlist.vue

@@ -5,7 +5,7 @@
     </Toptitle>
     <div class="weight_memo_content">
       <div>
-        <Topsearch :list="list" @init="initData" @searchData="searchData" />
+        <Topsearch :list="list" @searchData="searchData" />
       </div>
       <div
         style="
@@ -15,27 +15,33 @@
           padding-top: 10px;
         "
       >
-        <Button type="primary" size="small" style="margin-right: 10px" @click="gotoPage(3)"
+        <Button
+          type="primary"
+          size="small"
+          style="margin-right: 10px"
+          @click="gotoPage(3)"
           >新增</Button
         >
       </div>
       <Table :columns="tableColumns" border :data="tableData">
-        <template slot="make_data" slot-scope="{row}">
-          <span>{{func.replaceDateNoHMS(row.crt_time)}}</span>
+        <template slot="make_data" slot-scope="{ row }">
+          <span>{{ func.replaceDateNoHMS(row.crt_time) }}</span>
         </template>
-     </Table>
+      </Table>
+    </div>
+    <div class="content_body_page">
+      <Page
+        :page-size-opts="[10, 20, 30, 40, 100]"
+        @on-page-size-change="changeSize"
+        @on-change="changePage"
+        :current="pageIndex"
+        show-total
+        show-elevator
+        :total="total"
+        show-sizer
+        :page-size="pageSize"
+      />
     </div>
-      <div class="content_body_page">
-          <Page :page-size-opts="[10, 20, 30, 40,100]"
-                @on-page-size-change='changeSize'
-                @on-change='changePage'
-                :current='pageIndex'
-                show-total
-                show-elevator
-                :total="total"
-                show-sizer
-                :page-size='pageSize' />
-        </div>
   </div>
 </template>
 <script>
@@ -78,127 +84,133 @@ export default {
         // },
       ],
       tableColumns: [
-        { title: "项目编码", key: "project_number", align: "center" , resizable: true,
-                        width: 350},
-        { title: "项目名称", key: "project_name", align: "center",  resizable: true,
-                        width: 350 },
-        { title: "项目简称", key: "abbreviation", align: "center", resizable: true,
-                        width: 350},
+        {
+          title: "项目编码", key: "project_number", align: "center", resizable: true,
+          width: 350
+        },
+        {
+          title: "项目名称", key: "project_name", align: "center", resizable: true,
+          width: 350
+        },
+        {
+          title: "项目简称", key: "abbreviation", align: "center", resizable: true,
+          width: 350
+        },
         // { title: "匹配状态", key: "state", align: "center", minWidth: 140,
         // render:(h,params)=>{
         //   return h('span',{},params.row.state===0?'未匹配':params.row.state===2?'匹配完成':'匹配中')
         // }},
-        { title: "制单日期", key: "make_data", align: "center",  resizable: true,
-                        width: 350,slot:"make_data"},
-        { title: "操作", key:'',align: "center", minWidth:150,
-         render: (h, params) => {
-                            return h('div', [
-                                h('a', { style: {
-                                        marginRight: '5px'
-                                    }, on: {
-                                        click: () => {
-                                            this.gotoPage(1,params.row)
-                                        }
-                                    }
-                                    }, '编辑'),
-                                h('a', { style: {
-                                        marginRight: '5px'
-                                    }, on: {
-                                        click: () => {
-                                            this.gotoPage(2,params.row)
-                                        }
-                                    }
-                                    }, '查看'),
-                                h('a',{ style: {
-                                        marginRight: '5px'
-                                    }, on: {
-                                        click: () => {
-                                            this.del(params.row)
-                                        }
-                                    }},'删除')
-                            ]);
-                        }},
+        {
+          title: "制单日期", key: "make_data", align: "center", resizable: true,
+          width: 350, slot: "make_data"
+        },
+        {
+          title: "操作", key: '', align: "center", minWidth: 150,
+          render: (h, params) => {
+            return h('div', [
+              h('a', {
+                style: {
+                  marginRight: '5px'
+                }, on: {
+                  click: () => {
+                    this.gotoPage(1, params.row)
+                  }
+                }
+              }, '编辑'),
+              h('a', {
+                style: {
+                  marginRight: '5px'
+                }, on: {
+                  click: () => {
+                    this.gotoPage(2, params.row)
+                  }
+                }
+              }, '查看'),
+              h('a', {
+                style: {
+                  marginRight: '5px'
+                }, on: {
+                  click: () => {
+                    this.del(params.row)
+                  }
+                }
+              }, '删除')
+            ]);
+          }
+        },
       ],
       tableData: [],
-      pageIndex: JSON.parse(localStorage.getItem("pageIndex")) || 1,
-      pageSize: JSON.parse(localStorage.getItem("pageSize")) || 10,
+      pageIndex: 1,
+      pageSize: 10,
       total: 0,
+      proxyData: {},
     };
   },
+  mounted() {
+    this.initData();
+  },
   methods: {
-    searchData(){
+    searchData(row) {
       this.pageIndex = 1;
       this.pageSize = 10;
-      let row = {};
-      this.list.forEach((e) => {
-        if (e.serverName == "project_number") {
-          this.$set(row, "project_number", e.value);
-        }
-        if (e.serverName == "project_name") {
-          this.$set(row, "project_name", e.value);
-        }
-        if (e.serverName == "abbreviation") {
-          this.$set(row, "abbreviation", e.value);
-        }
-        // this.$set(对象, key, 数组);
-      });
-      localStorage.setItem("searchList", JSON.stringify(row));
+      this.proxyData = JSON.parse(JSON.stringify(row));
       this.initData(row);
     },
     initData(row) {
-      this.axios.get('/api/cut_order_list',{params:{
-        page_index:this.pageIndex,page_size:this.pageSize,
-        order_type:1,
-        ...row}}).then(res=>{
+      this.axios.get('/api/cut_order_list', {
+        params: {
+          page_index: this.pageIndex, page_size: this.pageSize,
+          order_type: 1,
+          ...row
+        }
+      }).then(res => {
         this.tableData = res.data.data;
         this.total = res.data.total
       })
     },
-    del(row){
+    del(row) {
       this.confirmDelete({
-                content:'是否删除?',
-                title:'码单删除',
-                type:'primary',
-                then:()=>{
-                       this.axios.post('/api/cut_order_delete',{cut_order_id:row.id,order_type:1}).then(()=>{
-            this.initData()
+        content: '是否删除?',
+        title: '码单删除',
+        type: 'primary',
+        then: () => {
+          this.axios.post('/api/cut_order_delete', { cut_order_id: row.id, order_type: 1 }).then(() => {
+            this.initData(this.proxyData);
           })
-                },
-                cancel:()=>{}
-            })
-       
+        },
+        cancel: () => { }
+      })
+
     },
-    gotoPage(type,row){
-      localStorage.setItem("list", JSON.stringify(this.list));
-      localStorage.setItem("pageSize", this.pageSize);
-      localStorage.setItem("pageIndex", this.pageIndex);
+    gotoPage(type, row) {
       //1 编辑 2 查看 3 新增
-      switch(type){
+      switch (type) {
         case 1:
-          case 2:this.$router.push({ path: '/cms/leadMatch/weightMemo/BSTedit', query: { type:type,cut_order_id:row.id} });
+        case 2: this.$router.push({ path: '/cms/leadMatch/weightMemo/BSTedit', query: { type: type, cut_order_id: row.id } });
           break
-          case 3:this.$router.push({ path: '/cms/leadMatch/weightMemo/BSTedit', query: { type:type} });
+        case 3: this.$router.push({ path: '/cms/leadMatch/weightMemo/BSTedit', query: { type: type } });
           break
       }
     },
-    changeSize (e) {
+    changeSize(e) {
       this.pageSize = e;
-      this.initData()
+      this.pageIndex = 1;
+      this.initData(this.proxyData);
     },
-     changePage (e) {
+    changePage(e) {
       this.pageIndex = e;
-      this.initData()
+      this.initData(this.proxyData);
     },
   },
 };
 </script>
 <style scoped lang='scss'>
-.weight_memo_content{
-    height: 80%;
-    overflow: auto;
+.weight_memo_content {
+  height: 80%;
+  overflow: auto;
 }
-.content_body_page{
-    margin-top: 10px;
-    text-align: center;
+.content_body_page {
+  margin-top: 10px;
+  text-align: center;
 }
 </style>

+ 6 - 6
vue.config.js

@@ -1,12 +1,12 @@
 const axios_default_ip =
   process.env.NODE_ENV == "dev"
-    ? "http://124.71.176.88:70"
+    ? "http://hxyapi.qingyaokeji.com"
     : process.env.NODE_ENV == "test-prd"
-    ? "http://121.41.102.225:82" //
-    : process.env.NODE_ENV == "prd_other"
-    ? "http://121.37.173.82:82" //贝斯特
-    : "http://124.71.176.88:882";
-    //http://hxy_api.qingyaokeji.com // 华信源
+      ? "http://hxyapi.qingyaokeji.com" //
+      : process.env.NODE_ENV == "prd_other"
+        ? "http://121.37.173.82:82" //贝斯特
+        : "http://124.71.176.88:882";
+//http://hxy_api.qingyaokeji.com // 华信源
 //  http://124.71.176.88:882  //江山
 // 'http://121.41.102.225:82' :测试
 // http://124.71.176.88:70  下沙新地址

Някои файлове не бяха показани, защото твърде много файлове са промени