mushencc 2 سال پیش
والد
کامیت
0798b48189

+ 71 - 70
package.json

@@ -1,70 +1,71 @@
-{
-    "name": "system_cms",
-    "version": "0.1.0",
-    "private": true,
-    "scripts": {
-        "serve": "cross-env NODE_ENV=dev vue-cli-service serve",
-        "test-build": "cross-env NODE_ENV=test-prd vue-cli-service build",
-        "build": "cross-env NODE_ENV=prd vue-cli-service build",
-        "build-other-server": "cross-env NODE_ENV=prd_other vue-cli-service build",
-        "lint": "vue-cli-service lint"
-    },
-    "dependencies": {
-        "@vant/touch-emulator": "^1.3.2",
-        "axios": "^0.19.2",
-        "core-js": "^3.6.5",
-        "cross-env": "^7.0.3",
-        "echarts": "^4.9.0",
-        "element-ui": "^2.15.5",
-        "epic-spinners": "^1.1.0",
-        "jquery": "^3.6.0",
-        "node-sass": "^4.14.1",
-        "sass-loader": "^9.0.3",
-        "swiper": "5.x",
-        "umy-ui": "^1.1.6",
-        "v-charts": "^1.19.0",
-        "v-viewer": "^1.5.1",
-        "vant": "^2.12.33",
-        "view-design": "^4.6.1",
-        "vue": "^2.6.13",
-        "vue-awesome-swiper": "^4.1.1",
-        "vue-img-previewer": "^0.2.3",
-        "vue-router": "^3.4.1",
-        "vue-slicksort": "^1.1.3",
-        "vuex": "^3.5.1",
-        "vxe-table": "^3.5.9",
-        "vxe-table-plugin-iview": "^1.11.4",
-        "xe-utils": "^3.4.0"
-    },
-    "devDependencies": {
-        "@vue/cli-plugin-babel": "~4.4.0",
-        "@vue/cli-plugin-eslint": "~4.4.0",
-        "@vue/cli-service": "~4.4.0",
-        "babel-eslint": "^10.1.0",
-        "babel-plugin-import": "^1.13.3",
-        "eslint": "^6.7.2",
-        "eslint-plugin-vue": "^6.2.2",
-        "jquery": "^3.6.0",
-        "lib-flexible": "^0.3.2",
-        "vue-template-compiler": "^2.6.13"
-    },
-    "eslintConfig": {
-        "root": true,
-        "env": {
-            "node": true
-        },
-        "extends": [
-            "plugin:vue/essential",
-            "eslint:recommended"
-        ],
-        "parserOptions": {
-            "parser": "babel-eslint"
-        },
-        "rules": {}
-    },
-    "browserslist": [
-        "> 1%",
-        "last 2 versions",
-        "not dead"
-    ]
-}
+{
+  "name": "system_cms",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "cross-env NODE_ENV=dev vue-cli-service serve",
+    "test-build": "cross-env NODE_ENV=test-prd vue-cli-service build",
+    "build": "cross-env NODE_ENV=prd vue-cli-service build",
+    "build-other-server": "cross-env NODE_ENV=prd_other vue-cli-service build",
+    "lint": "vue-cli-service lint"
+  },
+  "dependencies": {
+    "@vant/touch-emulator": "^1.3.2",
+    "axios": "^0.19.2",
+    "core-js": "^3.6.5",
+    "cross-env": "^7.0.3",
+    "echarts": "^4.9.0",
+    "element-ui": "^2.15.5",
+    "epic-spinners": "^1.1.0",
+    "jquery": "^3.6.0",
+    "node-sass": "^4.14.1",
+    "sass-loader": "^9.0.3",
+    "swiper": "5.x",
+    "umy-ui": "^1.1.6",
+    "v-charts": "^1.19.0",
+    "v-viewer": "^1.5.1",
+    "vant": "^2.12.33",
+    "view-design": "^4.6.1",
+    "vue": "^2.6.13",
+    "vue-awesome-swiper": "^4.1.1",
+    "vue-img-previewer": "^0.2.3",
+    "vue-router": "^3.4.1",
+    "vue-slicksort": "^1.1.3",
+    "vuex": "^3.5.1",
+    "vxe-table": "^3.5.9",
+    "vxe-table-plugin-iview": "^1.11.4",
+    "xe-utils": "^3.4.0"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "~4.4.0",
+    "@vue/cli-plugin-eslint": "~4.4.0",
+    "@vue/cli-service": "~4.4.0",
+    "babel-eslint": "^10.1.0",
+    "babel-plugin-import": "^1.13.3",
+    "cross-env": "^7.0.3",
+    "eslint": "^6.7.2",
+    "eslint-plugin-vue": "^6.2.2",
+    "jquery": "^3.6.0",
+    "lib-flexible": "^0.3.2",
+    "vue-template-compiler": "^2.6.13"
+  },
+  "eslintConfig": {
+    "root": true,
+    "env": {
+      "node": true
+    },
+    "extends": [
+      "plugin:vue/essential",
+      "eslint:recommended"
+    ],
+    "parserOptions": {
+      "parser": "babel-eslint"
+    },
+    "rules": {}
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not dead"
+  ]
+}

+ 5 - 6
src/axios/index.js

@@ -1,9 +1,8 @@
 import axios from "axios";
 
 import Vue from "vue";
-
 const instance = axios.create(config);
-
+console.log(instance);
 // 3. 配置信息
 let config = {
   // 每次请求的协议、IP地址。  设置该配置后,每次请求路径都可以使用相对路径,例如"/admin/login"
@@ -16,10 +15,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 +30,7 @@ instance.interceptors.request.use(
     config.headers["Authorization"] = token;
     return config;
   },
-  function(error) {
+  function (error) {
     // 对请求错误做些什么
     return Promise.reject(error);
   }

+ 54 - 26
src/views/ProcessRoute/edit.vue

@@ -12,7 +12,7 @@
         <FormItem label="ID">
           <Input v-model="info.id" disabled placeholder="自动生成" />
         </FormItem>
-        <FormItem label="部件名称" prop="parts_id">
+        <!-- <FormItem label="部件名称" prop="parts_id">
           <Select
             :disabled="type == 3"
             filterable
@@ -27,7 +27,7 @@
               :label="item.title"
             ></Option>
           </Select>
-        </FormItem>
+        </FormItem> -->
 
         <FormItem label="工艺组合名称" prop="title">
           <Input
@@ -52,7 +52,7 @@
           </span>
         </span>
       </span> -->
-      <div class="hierarchy" v-for="item of info.list" :key="item.name">
+      <!-- <div class="hierarchy" v-for="item of info.list" :key="item.name">
         <span>{{ item.name || item.title }}(多选):</span>
         <div v-for="_item in item.cld" class="radio-g" :key="_item.type_title">
           <div class="tit_box">
@@ -69,23 +69,30 @@
           >
             {{ __item.title }}
           </div></div>
-        </div>
+        </div> -->
         <!-- <div class="radio-g">
           <div @click="setRadioChange(item,_item)"
                :class="['radio-us',_item.show ? 'radio-us-foc' : '']"
                v-for='_item of item.cld'
                :key="_item.id">{{_item.title}}</div>
         </div> -->
-      </div>
-      <div style="padding:10px 0;">
+      <!-- </div> -->
+      <div style="padding:10px 0;display:flex;justify-content:space-between">
+        <div>
         <span>工艺路线:</span>
         <Button :disabled="type == 3" @click="editRouter()">{{
           type == 1 ? "选择工艺路线" : "选择工艺路线"
         }}</Button>
-        {{ process_name }}
+        {{ process_name }}</div>
+        <Button type="primary" @click="handleAddLine">增行</Button>
       </div>
 
-      <Table border :columns="tableColumns" :data="tableData">
+      <Table border :columns="tableColumns" :data="tableData" draggable @on-drag-drop='handleDrop'>
+        <template slot="title" slot-scope="{row}">
+          <Select v-model="row.title" filterable clearable transfer @on-change='handleChange(row,index,1)'>
+            <Option v-for='(item,index) in processRouteList' :key="index" :label="item.title" :value="item.title"/>
+          </Select>
+        </template>
         <template slot="time" slot-scope="{row,index}">
           <Input clearable placeholder="请输入" v-model="row.time" @on-change='handleChange(row,index)'/>
         </template>
@@ -95,6 +102,9 @@
         <template slot="capacity" slot-scope="{row,index}">
  <Input clearable placeholder="请输入" v-model="row.capacity" @on-change='handleChange(row,index)'/>
         </template>
+        <template slot="set" slot-scope="{row,index}">
+          <a @click="handleDel(row,index)">删除</a>
+        </template>
       </Table>
     </div>
     <Modal
@@ -329,6 +339,7 @@ import { SlickList, SlickItem } from "vue-slicksort";
 export default {
   data() {
     return {
+      processRouteList:[],
       tempProcessLine: {
         title: "",
       },
@@ -348,7 +359,7 @@ export default {
       info: {
         title: "",
         price: "",
-        parts_id: "",
+        parts_id: 0,
         id: null,
         properties: [], //工序号
         procedure: [], //工艺属性id
@@ -363,10 +374,11 @@ export default {
       tableColumns: [
         { title: "序号", type: "index", align: "center", key: "" ,resizable:true,width:200},
         // { title: 'ID', align: 'center', key: 'id' },
-        { title: "工序名称", align: "center", key: "title" ,resizable:true,width:340},
-        { title: "工时", align: "center", key: "time" ,resizable:true,width:340,slot:'time'},
-        { title: "工价", align: "center", key: "wages" ,resizable:true,width:340,slot:'wages'},
-        { title: "产能", align: "center", key: "capacity",minWidth:150,slot:'capacity' },
+        { title: "工序名称", align: "center", key: "title" ,resizable:true,width:340,slot:'title'},
+        { title: "工时", align: "center", key: "time" ,resizable:true,width:250,slot:'time'},
+        { title: "工价", align: "center", key: "wages" ,resizable:true,width:250,slot:'wages'},
+        { title: "产能", align: "center", key: "capacity",width:250,resizable:true, slot:'capacity' },
+        {title:'操作',align:'center',key:'set',minWidth:100,slot:'set'}
       ],
       tableData: [],
       processRouteId: "",
@@ -399,6 +411,10 @@ export default {
     this.axios("/api/bp_list").then((res) => {
       this.info.bps = res.data;
       this.temp_info_bps = res.data;
+      this.processRouteList = [];
+      res.data.forEach(v=>{
+        this.processRouteList.push(...v.cld)
+      })
     });
     if (this.type == 1) {
       this.axios("/api/bpp_list_new").then((res) => {
@@ -419,7 +435,19 @@ export default {
     this.getParts();
   },
   methods: {
-    handleChange(row,index){
+    handleDel(row,index){
+        this.tableData.splice(index,1);
+    },
+    handleDrop(a,b){
+ this.tableData.splice(b, 0, ...this.tableData.splice(a, 1))
+    },
+    handleAddLine(){
+        this.tableData.unshift({});
+    },
+    handleChange(row,index,type){
+      if(type){
+        row.id = this.processRouteList.find(v=>(v.title==row.title)).id;
+      }
        this.tableData.splice(index,1,row);
     },
     handleProcessLineSet(row, index) {
@@ -489,24 +517,24 @@ export default {
       let data = JSON.parse(JSON.stringify(this.info));
       data.technological_route_id = data.id;
       type == 4 ? (data.id = "") : "";
-      let properties=[],procedure=[],procedure_list = [];
+      let procedure=[],procedure_list = [];
       procedure_list = this.tableData;
-      data.list.forEach((element) => {
-        element.cld.forEach((elem) => {
-          elem.list.forEach((el) => {
-            if (el.show) {
-              properties.push(el.id);
-            }
-          });
-        });
-      });
-      this.selectTags.map((v) => {
+      // data.list.forEach((element) => {
+      //   element.cld.forEach((elem) => {
+      //     elem.list.forEach((el) => {
+      //       if (el.show) {
+      //         properties.push(el.id);
+      //       }
+      //     });
+      //   });
+      // });
+      this.tableData.map((v) => {
         procedure.push(v.id);
       });
       delete data.list;
       delete data.bps;
       this.type == 1 ? delete data.id : "";
-      data.properties = properties;
+      data.properties =[1,2,3];
       data.procedure = procedure.join(",");
       data.procedure_list = procedure_list;
       this.axios.post("/api/process_route_save", data).then((res) => {

+ 7 - 7
src/views/ProcessRoute/index.vue

@@ -183,13 +183,13 @@ export default {
           serverName: "title",
           placeholder: "请输入工艺组合名称",
         },
-        {
-          title: "部件名称",
-          name: "Input",
-          value: "",
-          serverName: "part_title",
-          placeholder: "请输入部件名称",
-        },
+        // {
+        //   title: "部件名称",
+        //   name: "Input",
+        //   value: "",
+        //   serverName: "part_title",
+        //   placeholder: "请输入部件名称",
+        // },
       ],
       tableColums: [],
       tableData: [],

+ 3 - 2
src/views/ProductionOrderList/ProductionPlanlist/BST_two.vue

@@ -19,14 +19,14 @@
       :total="total"
     >
       <div slot="titleButton">
-        <Button
+        <!-- <Button
           v-if="persimissionData['分类派工'] || persimissionData.all"
           type="primary"
           style="margin-right:10px"
           @click="handleDispatchType(selects)"
           ghost
           >批量派工</Button
-        >
+        > -->
         <!-- <Button
           v-if="persimissionData['批量派工单'] || persimissionData.all"
           type="primary"
@@ -757,6 +757,7 @@ export default {
     },
     handleDispatchType(row) {
       // console.log("row :>> ", row);
+      console.log(row);
       this.axios.post('/api/order_produce_list').then(res=>{
         if(res.code == 200){
              this.$router.push({

+ 263 - 100
src/views/ProductionOrderList/ProductionPlanlist/confirm.vue

@@ -1,114 +1,277 @@
 
 <template>
-    <div>
-        <Toptitle title="生产排产详情">
-            <Button @click="$router.go(-1)">返回</Button>
-        </Toptitle>
-         <Form :label-width='100' style="margin-top:10px;display:flex;flex-wrap:wrap">
-            <FormItem label='图号:'>
-                <Input clearable style="width:200px" placeholder="请输入图号"/>
-            </FormItem>
-            <FormItem label='组件:'>
-                <Input clearable style="width:200px" placeholder="请输入组件"/>
-            </FormItem>
-            <FormItem label='房号:'>
-                <Input clearable style="width:200px" placeholder="请输入房号"/>
-            </FormItem>
-             <FormItem label='派工状态:'>
-               <Select filterable clearable v-model="searchData.state" style="width:200px">
-                <Option label="未派工" :value="0"></Option>
-                <Option label="已派工" :value="1"></Option>
-               </Select>
-            </FormItem>
-            <FormItem :label-width='30'>
-                <Button type="primary" @click="handleSearch">搜索</Button>
-            </FormItem>
-        </Form>
-        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
-            <template slot="img" slot-scope="{row}">
-                <img v-for="(item,index) in row.url_img" :key="index" :src="$store.state.ip+item" alt="">
-            </template>
-            <template slot="set" slot-scope="{row}">
-                <a @click="goPage(row)">详情</a>
-            </template>
-        </Table>
-        <Page
-        style="text-align:center;margin-top:10px"
-          :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>
+    <Toptitle title="生产排产详情">
+      <Button
+        @click="$router.go(-1)"
+        style="margin-right:10px"
+      >返回</Button>
+      <Button
+        @click="handlePlanWork"
+        type="primary"
+      >批量派工</Button>
+    </Toptitle>
+    <Form
+      :label-width='100'
+      style="margin-top:10px;display:flex;flex-wrap:wrap"
+    >
+      <FormItem label='图号:'>
+        <Input
+          clearable
+          style="width:200px"
+          placeholder="请输入图号"
         />
-    </div>
+      </FormItem>
+      <FormItem label='组件:'>
+        <Input
+          clearable
+          style="width:200px"
+          placeholder="请输入组件"
+        />
+      </FormItem>
+      <FormItem label='房号:'>
+        <Input
+          clearable
+          style="width:200px"
+          placeholder="请输入房号"
+        />
+      </FormItem>
+      <FormItem label='派工状态:'>
+        <Select
+          filterable
+          clearable
+          v-model="searchData.state"
+          style="width:200px"
+        >
+          <Option
+            label="未派工"
+            :value="0"
+          ></Option>
+          <Option
+            label="已派工"
+            :value="1"
+          ></Option>
+        </Select>
+      </FormItem>
+      <FormItem :label-width='30'>
+        <Button
+          type="primary"
+          @click="handleSearch"
+        >搜索</Button>
+      </FormItem>
+    </Form>
+    <Table
+      border
+      :data='tableData'
+      :columns='tableColumns'
+      max-height='550'
+      @on-selection-change='handleSelect'
+    >
+      <template
+        slot="img"
+        slot-scope="{row}"
+      >
+        <img
+          v-for="(item,index) in row.url_img"
+          :key="index"
+          :src="$store.state.ip+item"
+          alt=""
+        />
+      </template>
+      <template
+        slot="set"
+        slot-scope="{row}"
+      >
+        <a @click="goPage(row)">详情</a>
+      </template>
+    </Table>
+    <Page
+      style="text-align:center;margin-top:10px"
+      :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"
+    />
+    <Modal
+      v-model="show_work"
+      title="确认派工"
+    >
+      <Form
+        :label-width="85"
+        ref="forms"
+      >
+        <FormItem label="选择时间">
+          <DatePicker
+            style="width:100%;"
+            v-model="dispatchTime"
+            clearable
+            type="daterange"
+            split-panels
+            placeholder="请选择日期"
+          ></DatePicker>
+        </FormItem>
+        <FormItem label='班组'>
+          <Select
+            filterable
+            clearable
+            v-model="modalData.employee_id"
+          >
+            <Option
+              v-for="(item,index) in employeeList"
+              :key="index"
+              :label="item.nickname"
+              :value="item.id"
+            />
+          </Select>
+        </FormItem>
+        <FormItem label="点工单形式">
+          <RadioGroup v-model="modalData.work_type">
+            <Radio :label="1">是</Radio>
+            <Radio :label="0">否</Radio>
+          </RadioGroup>
+        </FormItem>
+        <FormItem
+          label="日薪"
+          v-if="modalData.work_type==1"
+        >
+          <Input v-model="modalData.user_salary">
+          <span slot="append">元</span>
+          </Input>
+        </FormItem>
+      </Form>
+      <div slot="footer">
+        <Button @click="show_work = false">取消</Button>
+        <Button
+          type="primary"
+          @click="handleDispatch"
+        >确认</Button>
+      </div>
+    </Modal>
+  </div>
 </template>
 <script>
 export default {
-    data(){
-        return{
-            searchData:{},
-         total:0,
-         pageSize:10,
-         pageIndex:1,
-         tableData:[{
-            order_no:'订单',
-            url_number:'01',
-            assembly:'产品组件',
-            house_number:'房号',
-            url_img:[],
-         }],
-         tableColumns:[
-            {title:'订单号',key:'order_no',align:'center',minWidth:120},
-            {title:'图号',key:'url_number',align:'center',minWidth:120},
-            {title:'产品名称',key:'product_title',align:'center',minWidth:120},
-            {title:'产品组件',key:'compose_name',align:'center',minWidth:120},
-            {title:'房号',key:'house_title',align:'center',minWidth:120},
-            {title:'图纸',key:'url_img',align:'center',minWidth:120,slot:'img'},
-            {title:'派工状态',key:'state',align:'center',minWidth:120,render:(h,params)=>{
-                const {row} = params;
-                return h('span',{},row.state==0?'未派工':'已派工')
-            }},
-            {title:'操作',key:'set',align:'center',minWidth:120,slot:'set'},
-         ],
-         proxyData:{}
-        }
+  data() {
+    return {
+      employeeList: [],
+      dispatchTime: [],
+      modalData: {
+        work_type: '',
+        user_salary: '',
+        start_time: '',
+        end_time: '',
+        employee_id: '',
+      },
+      selectData: [],
+      show_work: false,
+      searchData: {},
+      total: 0,
+      pageSize: 10,
+      pageIndex: 1,
+      tableData: [{
+        order_no: '订单',
+        url_number: '01',
+        assembly: '产品组件',
+        house_number: '房号',
+        url_img: [],
+      }],
+      tableColumns: [
+        { type: 'selection', align: 'center', minWidth: 80 },
+        { title: '订单号', key: 'order_no', align: 'center', minWidth: 120 },
+        { title: '图号', key: 'url_number', align: 'center', minWidth: 120 },
+        { title: '产品名称', key: 'product_title', align: 'center', minWidth: 120 },
+        { title: '产品组件', key: 'compose_name', align: 'center', minWidth: 120 },
+        { title: '房号', key: 'house_title', align: 'center', minWidth: 120 },
+        { title: '图纸', key: 'url_img', align: 'center', minWidth: 120, slot: 'img' },
+        {
+          title: '派工状态', key: 'state', align: 'center', minWidth: 120, render: (h, params) => {
+            const { row } = params;
+            return h('span', {}, row.state == 0 ? '未派工' : '已派工')
+          }
+        },
+        { title: '操作', key: 'set', align: 'center', minWidth: 120, slot: 'set' },
+      ],
+      proxyData: {}
+    }
+  },
+  created() {
+    //获取班组
+    this.axios("/api/employee_list").then(
+      (res) => (this.employeeList = res.data.data)
+    );
+  },
+  mounted() {
+    this.initData();
+  },
+  methods: {
+    handleDispatch() {
+      if (this.dispatchTime.length != 2) {
+        this.$Message.warning('请先选择时间!')
+      } else {
+        this.modalData.start_time = new Date(this.dispatchTime[0])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        this.modalData.end_time = new Date(this.dispatchTime[1])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+      }
+      this.selectData.forEach((v, index) => {
+        setTimeout(() => {
+          this.axios.post('/api/order_produce_pull_all', { ...v, ...this.modalData }).then(res => {
+            this.$Message.success(res.msg);
+            if (index == this.selectData.length - 1) {
+              this.initData(this.proxyData);
+            }
+          })
+        }, 1000)
+      })
+      this.show_work = false;
     },
-    mounted(){
-      this.initData();
+    handleSelect(e) {
+      this.selectData = e;
     },
-    methods:{
-        handleSearch(){
-         this.proxyData = JSON.parse(JSON.stringify(this.searchData));
-             this.pageIndex=1;
-             this.initData(this.proxyData); 
-        },
-        goPage(row){
-         this.$router.push({path:'/cms/productionorderlist/productionplanlist/details',query:{...this.$route.query,house_id:row.house_id,
-compose_name:row.compose_name,
-url_number:row.url_number}})
-        },
-        initData(obj){
-              this.axios.post('/api/new_product_scheduling_list',{order_no:this.$route.query.order_no,...obj,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
-                this.tableData = res.data.data;
-                this.total = res.data.total;
-            })
-        },
-        changeSize(e){
-             this.pageSize = e;
-             this.pageIndex = 1;
-             this.initData(this.proxyData);
-        },
-        changePage(e){
-            this.pageIndex = e;
-            this.initData(this.proxyData);
+    handlePlanWork() {
+      if (this.selectData.length == 0) {
+        return this.$Message.warning('请先选择数据!')
+      }
+      this.show_work = true;
+    },
+    handleSearch() {
+      this.proxyData = JSON.parse(JSON.stringify(this.searchData));
+      this.pageIndex = 1;
+      this.initData(this.proxyData);
+    },
+    goPage(row) {
+      this.$router.push({
+        path: '/cms/productionorderlist/productionplanlist/details', query: {
+          ...this.$route.query, house_id: row.house_id,
+          compose_name: row.compose_name,
+          url_number: row.url_number
         }
+      })
+    },
+    initData(obj) {
+      this.axios.post('/api/new_product_scheduling_list', { order_no: this.$route.query.order_no, ...obj, page_size: this.pageSize, page_index: this.pageIndex }).then(res => {
+        this.tableData = res.data.data;
+        this.total = res.data.total;
+      })
+    },
+    changeSize(e) {
+      this.pageSize = e;
+      this.pageIndex = 1;
+      this.initData(this.proxyData);
+    },
+    changePage(e) {
+      this.pageIndex = e;
+      this.initData(this.proxyData);
     }
+  }
 }
 </script>
 <style lang="scss" scoped>
-
 </style>

+ 14 - 1
src/views/ProductionOrderList/ProductionsOrder/confirm.vue

@@ -29,7 +29,7 @@
         <div style="height:75%;overflow:auto">
         <Table border :data='tableData' :columns='tableColumns' max-height='550' @on-selection-change='handleSelect'>
             <template slot="img" slot-scope="{row}">
-                <img v-for="(item,index) in row.url_img" :key="index" :src="$store.state.ip+item" alt="">
+                <img v-for="(item,index) in row.url" :key="index" @click="looks(row.url)" :src="$store.state.ip+item" alt="" style="width:30px;height:30px">
             </template>
             <template slot="set" slot-scope="{row}">
                 <a @click="goPage(row)" style="margin-right:10px">详情</a>
@@ -100,6 +100,19 @@ state:''
       this.initData();
     },
     methods:{
+       looks(img) {
+      const array = [];
+      img.forEach(v=>{
+        array.push({img_url:v})
+      })
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+        showPrint:true
+      });
+    },
         handleSelect(e){
            this.selects = e;
            console.log(this.selects)