Explorar el Código

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-aps into dev

chencc hace 1 año
padre
commit
c85f7f5bb5

+ 92 - 0
src/components/processSubmitDialog/api.js

@@ -0,0 +1,92 @@
+import request from '@/utils/request';
+
+export async function getProcessDefinitionBpmnXML(id) {
+  const res = await request({
+    url: '/bpm/process-definition/get-bpmn-xml?id=' + id,
+    method: 'get'
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getTaskAssignRuleList(query) {
+  const res = await request({
+    url: '/bpm/task-assign-rule/list',
+    method: 'get',
+    params: query
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function processInstanceCreateAPI(data) {
+  const res = await request(
+    {
+      url: '/bpm/process-instance/create',
+      method: 'post',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getModelPage(query) {
+  const res = await request({
+    url: '/bpm/model/page',
+    method: 'get',
+    params: query
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getProcessDefinitionInfo(params) {
+  const res = await request({
+    url: `/bpm/process-definition/get`,
+    method: 'get',
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function listAllUserBind() {
+  const res = await request.get('/main/user/listAllUserBind');
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 获取用户组精简信息列表
+export async function listSimpleUserGroups() {
+  const res = await request({
+    url: '/bpm/user-group/list-all-simple',
+    method: 'get'
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 产品分类指定code查询
+ */
+
+export async function getProduceTreeByCode(code) {
+  const res = await request.get(
+    `/main/categoryLevel/getProduceTreeByPid?code=${code}`,
+    {}
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 446 - 0
src/components/processSubmitDialog/processSubmitDialog.vue

@@ -0,0 +1,446 @@
+<template>
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible="processSubmitDialogFlag"
+    title="提交审核"
+    append-to-body
+    :close-on-click-modal="false"
+    width="50%"
+    :before-close="cancel"
+  >
+    <!--    <el-steps :active="active" align-center style="transform: scale(0.8)">-->
+    <!--      <el-step title="流程发起"></el-step>-->
+    <!--      <el-step title="流程通知"></el-step>-->
+    <!--    </el-steps>-->
+
+    <el-form
+      ref="form"
+      :rules="rules"
+      class="el-form-box"
+      :model="form"
+      label-width="80px"
+    >
+      <el-row v-show="active == 0">
+        <el-col :span="12">
+          <el-form-item label="流程分类">
+            <ele-tree-select
+              @change="changeLCFL"
+              clearable
+              ref="processTypeRef"
+              filterable
+              :data="LCFLList"
+              v-model="form.LCFL"
+              childrenKey="children"
+              valueKey="id"
+              labelKey="name"
+              placeholder="请选择"
+              default-expand-all
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发起流程">
+            <el-select
+              filterable
+              v-model="form.FQLC"
+              @change="changeFQLC"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in processList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row v-show="active == 0">
+        <el-col :span="12">
+          <el-form-item label="流程名称">
+            <el-input v-model="form.name" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="流程标识">
+            <el-input v-model="form.key" disabled></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <headerTitle
+        v-show="active == 0"
+        title="流程执行人/流程图"
+        style="margin-top: 30px"
+      ></headerTitle>
+      <el-table
+        v-show="active == 0"
+        :data="datasource"
+        border
+        style="margin-bottom: 10px"
+      >
+        <el-table-column
+          label="任务节点"
+          align="center"
+          prop="taskDefinitionName"
+          width="140"
+          fixed
+        />
+        <el-table-column
+          label="执行人"
+          align="center"
+          prop="options"
+          min-width="140px"
+        >
+          <template v-slot="scope">
+            <div v-if="scope.row.type !== 60 && scope.row.options.length > 0">
+              <el-tag
+                size="medium"
+                :key="option"
+                v-for="option in scope.row.options"
+              >
+                {{ getAssignRuleOptionName(scope.row, option) }}
+              </el-tag>
+            </div>
+
+            <el-tag size="medium" v-if="scope.row.type === 60">
+              {{ getAssignRuleOptionName(scope.row) }}
+            </el-tag>
+          </template>
+        </el-table-column>
+      </el-table>
+      <my-process-viewer
+        v-show="active == 0"
+        style="min-width: 100%; height: 200px"
+        key="designer"
+        v-model="bpmnXML"
+      />
+      <el-table v-show="active == 1" :data="form.noticeScope" border>
+        <el-table-column
+          label="类型"
+          align="center"
+          prop="taskDefinitionName"
+          width="140"
+          fixed
+        />
+        <el-table-column
+          label="结果"
+          align="center"
+          prop="options"
+          min-width="140px"
+        >
+        </el-table-column>
+      </el-table>
+    </el-form>
+
+    <div slot="footer">
+      <!--      <el-button-->
+      <!--        type="primary"-->
+      <!--        size="small"-->
+      <!--        v-if="active == 0"-->
+      <!--        @click="() => (active = 1)"-->
+      <!--        >下一步-->
+      <!--      </el-button>-->
+      <!--      <el-button-->
+      <!--        type="primary"-->
+      <!--        size="small"-->
+      <!--        v-if="active == 1"-->
+      <!--        @click="() => (active = 0)"-->
+      <!--        >上一步-->
+      <!--      </el-button>-->
+      <el-button type="primary" size="small" @click="submit" v-click-once
+        >提交</el-button
+      >
+      <el-button
+        v-if="isNotNeedProcess && $hasPermission('eom:common:submitrelease')"
+        type="primary"
+        size="small"
+        @click="submit1"
+        v-click-once
+        >提交并发布</el-button
+      >
+      <el-button size="small" @click="cancel">关闭</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  import {
+    getModelPage,
+    getProcessDefinitionBpmnXML,
+    getProcessDefinitionInfo,
+    getTaskAssignRuleList,
+    listAllUserBind,
+    listSimpleUserGroups,
+    processInstanceCreateAPI,getProduceTreeByCode
+  } from './api';
+  import { treeClassifyCodeEnum } from '@/enum/dict';
+  import { listRoles } from '@/api/system/role';
+  import { listOrganizations } from '@/api/system/organization';
+  import dictMixins from '@/mixins/dictMixins';
+  import { getByCode } from '@/api/system/dictionary-data';
+
+  export default {
+    name: 'processSubmitDialog',
+    mixins: [dictMixins],
+    props: {
+      processSubmitDialogFlag: {
+        type: Boolean,
+        default: false
+      },
+      isNotNeedProcess: {
+        type: Boolean,
+        default: false
+      },
+      approvalStatus: {
+        type: Number,
+        default: 2
+      },
+      apiFunName: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {
+          LCFL: '',
+          FQLC: '',
+          processDefinitionId: '',
+          name: '',
+          businessId: '',
+          noticeScope: [],
+          businessKey: '',
+          formCreateUserId: ''
+        },
+        active: 0,
+        bpmnXML: null,
+        LCFLList: [],
+        processList: [],
+        datasource: [],
+        roleOptions: [],
+        deptOptions: [],
+        deptTreeOptions: [],
+        postOptions: [],
+        userOptions: [],
+        userGroupOptions: [],
+        dictList: {},
+        rules: {}
+      };
+    },
+    async created() {
+      let typeObj = await getProduceTreeByCode(
+        'PROCESS001'
+      );
+      this.LCFLList = typeObj[0].children;
+
+      // 获得角色列表
+      this.roleOptions = [];
+      listRoles({
+        current: 1,
+        size: 9999
+      }).then((data) => {
+        this.roleOptions.push(...data.list);
+      });
+      // 获得部门列表
+      this.deptOptions = [];
+      this.deptTreeOptions = [];
+      listOrganizations().then((data) => {
+        this.deptOptions.push(...data);
+        this.deptTreeOptions.push(...this.handleTree(data, 'id'));
+      });
+      // 获得岗位列表 暂无岗位概念
+      this.postOptions = [];
+      /*listSimplePosts().then(response => {
+  this.postOptions.push(...response.data);
+});*/
+      // 获得用户列表
+      this.userOptions = [];
+      listAllUserBind().then((data) => {
+        this.userOptions.push(...data);
+      });
+      // 获得用户组列表
+      this.userGroupOptions = [];
+      listSimpleUserGroups().then((response) => {
+        this.userGroupOptions.push(...response);
+      });
+
+      //this.dictEnum['工作流任务分配自定义脚本']
+      await this.getDictList('bpm_task_assign_script');
+      await this.getDictList('work_type');
+    },
+    methods: {
+      init(row = {}) {
+        this.form = { ...this.form, ...row };
+        // this.form.businessId = row.id;
+        // this.form.businessKey = row.businessKey;
+        // this.form.formCreateUserId = row.createUserId;
+        this.getDefaultInfo(row.businessKey);
+      },
+      async getDefaultInfo(businessKey) {
+        let info = await getProcessDefinitionInfo({ code: businessKey });
+        this.form.LCFL = info?.category;
+        this.form.FQLC = info?.modelId;
+        this.form.name = info?.name;
+        this.form.key = info?.key;
+        this.form.processDefinitionId = info?.id;
+        if (this.form.LCFL) await this.getProcessList(this.form.LCFL);
+        if (this.form.FQLC) {
+          await this.getProcessDefinitionBpmnXMLInfo(info.id);
+          await this.getTaskAssignRuleListInfo({
+            modelId: info.modelId,
+            processDefinitionId: info.id
+          });
+        }
+      },
+      async changeLCFL(val) {
+        this.bpmnXML = null;
+        this.form.processDefinitionId = null;
+        this.form.FQLC = null;
+        await this.getProcessList(val);
+      },
+      async getProcessList(val) {
+        let params = {
+          pageNo: 1,
+          pageSize: 999,
+          processTypeId: val
+        };
+        const { list } = await getModelPage(params);
+        this.processList = list.filter((item) => item.processDefinition);
+      },
+      async changeFQLC(val) {
+        if (!val) return;
+        let find = this.processList.find((item) => item.id === val) || {};
+        this.form.name = find.name;
+        this.form.key = find.key;
+        this.form.processDefinitionId = find.processDefinition.id;
+        await this.getProcessDefinitionBpmnXMLInfo(find.processDefinition.id);
+        await this.getTaskAssignRuleListInfo({
+          modelId: find.id,
+          processDefinitionId: find.processDefinition.id
+        });
+      },
+      async getProcessDefinitionBpmnXMLInfo(val) {
+        // 加载流程图
+        this.bpmnXML = await getProcessDefinitionBpmnXML(val);
+      },
+      async getTaskAssignRuleListInfo(find) {
+        this.datasource = await getTaskAssignRuleList({
+          modelId: find.modelId,
+          processDefinitionId: find.processDefinitionId
+        });
+      },
+      getAssignRuleOptionName(row, option) {
+        console.log(row,'row')
+        if (row.type == 10) {
+          for (const roleOption of this.roleOptions) {
+            if (roleOption.id === option) {
+              return roleOption.name;
+            }
+          }
+        } else if (row.type === 20 || row.type === 21) {
+          for (const deptOption of this.deptOptions) {
+            if (deptOption.id === option) {
+              return deptOption.name;
+            }
+          }
+        } else if (row.type === 22) {
+          option = option + ''; // 转换成 string
+          return this.getDictV('work_type', option);
+        } else if (row.type === 30 || row.type === 31 || row.type === 32) {
+          for (const userOption of this.userOptions) {
+            if (userOption.id === option) {
+              return userOption.nickname || userOption.name;
+            }
+          }
+        } else if (row.type === 40) {
+          for (const userGroupOption of this.userGroupOptions) {
+            if (userGroupOption.id === option) {
+              return userGroupOption.name;
+            }
+          }
+        } else if (row.type === 50) {
+          option = option + ''; // 转换成 string
+          return this.getDictV(
+            'bpm_task_assign_script',
+            option
+          );
+        } else if (row.type === 60) {
+          return row.variableName;
+        }
+        return '未知(' + option + ')';
+      },
+      /**
+       * 构造树型结构数据
+       * @param {*} data 数据源
+       * @param {*} id id字段 默认 'id'
+       * @param {*} parentId 父节点字段 默认 'parentId'
+       * @param {*} children 孩子节点字段 默认 'children'
+       * @param {*} rootId 根Id 默认 0
+       */
+      handleTree(data, id, parentId, children, rootId) {
+        id = id || 'id';
+        parentId = parentId || 'parentId';
+        children = children || 'children';
+        rootId =
+          rootId ||
+          Math.min.apply(
+            Math,
+            data.map((item) => {
+              return item[parentId];
+            })
+          ) ||
+          0;
+        //对源数据深度克隆
+        const cloneData = JSON.parse(JSON.stringify(data));
+        //循环所有项
+        const treeData = cloneData.filter((father) => {
+          let branchArr = cloneData.filter((child) => {
+            //返回每一项的子级数组
+            return father[id] == child[parentId];
+          });
+          branchArr.length > 0 ? (father.children = branchArr) : '';
+          //返回第一层
+          return father[parentId] == rootId;
+        });
+        return treeData !== '' ? treeData : data;
+      },
+      getDictV(code, val) {
+        if (!this.dictList[code]) return '';
+        return this.dictList[code].find((item) => item.value == val)?.label;
+      },
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList[code] = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
+          };
+        });
+      },
+      async submit() {
+        await processInstanceCreateAPI(this.form);
+        this.$message('提交审核成功');
+        this.$emit('reload');
+        this.cancel();
+      },
+      async submit1() {
+        let params = {
+          id: this.form.businessId,
+          approvalStatus: this.approvalStatus,
+          ...this.form
+        };
+        await this[this.apiFunName](params);
+        //await processInstanceUpdateStatusAPI(params);
+        this.$message('提交发布成功');
+        this.$emit('reload');
+        this.cancel();
+      },
+      cancel() {
+        this.$emit('update:processSubmitDialogFlag', false);
+      }
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 4 - 1
src/enum/dict.js

@@ -21,7 +21,10 @@ export default {
   计量单位: 'measuring_uint',
   开槽类型: 'slotting_type',
   需求类型: 'requirement_source_type',
-  外协委外: 'outsource_dict'
+  外协委外: 'outsource_dict',
+  工作流任务分配规则的类型: 'bpm_task_assign_rule_type',
+  工作流任务分配自定义脚本: 'bpm_task_assign_script',
+  流程实例的结果: 'bpm_process_instance_result',
 };
 
 export const numberList = [

+ 16 - 2
src/main.js

@@ -5,7 +5,10 @@ import App from './App.vue';
 import store from './store';
 import router from './router';
 import permission from './utils/permission';
-import { MAP_KEY, LICENSE_CODE } from '@/config/setting';
+import {
+  MAP_KEY,
+  LICENSE_CODE
+} from '@/config/setting';
 import EleAdmin from 'ele-admin';
 import VueClipboard from 'vue-clipboard2';
 import i18n from './i18n';
@@ -29,6 +32,14 @@ import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css';
 import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css';
 import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
 
+import {
+  handleInputPublicHasPoint,
+  handleInputPublic
+} from './utils/inputHandler';
+
+Vue.prototype.$handleInputPublicHasPoint = handleInputPublicHasPoint;
+Vue.prototype.$handleInputPublic = handleInputPublic;
+
 // // register globally
 import '@/icons';
 Vue.component('DictSelection', DictSelection);
@@ -47,7 +58,10 @@ Vue.use(VueClipboard);
 let instance = null;
 
 function render(props = {}) {
-  const { container, routerBase } = props;
+  const {
+    container,
+    routerBase
+  } = props;
   // const router = new VueRouter({
   //   base: window.__POWERED_BY_QIANKUN__ ? routerBase : process.env.BASE_URL,
   //   mode: 'history',

+ 28 - 0
src/utils/inputHandler.js

@@ -0,0 +1,28 @@
+/**
+ * 处理输入值,使其只包含数字和最多一个小数点,并且小数点后最多保留两位
+ * @param {string} value - 输入的值
+ * @returns {string} - 处理后的值
+ */
+
+//小数点后两位处理
+export const handleInputPublicHasPoint = (value) => {
+  // 过滤掉非数字和小数点的字符
+  const filteredValue = value.replace(/[^0-9.]/g, '');
+  // 限制只能有一个小数点
+  const singleDotValue = filteredValue.replace(/(\..*)\./g, '$1');
+
+  let finalValue = '';
+  const dotIndex = singleDotValue.indexOf('.');
+  if (dotIndex !== -1) {
+    // 截取小数点后最多两位
+    finalValue = singleDotValue.slice(0, dotIndex + 3);
+  } else {
+    finalValue = singleDotValue;
+  }
+  return finalValue;
+};
+//整数
+export const handleInputPublic = (value) => {
+  // 只能输入数字
+  return value.replace(/[^0-9]/g, '');
+};

+ 28 - 16
src/views/aps/capacity/index.vue

@@ -29,8 +29,8 @@
             @click="handleUpdate">修改</el-button>
           <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
             @click="handleDelete">删除</el-button>
-          <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
-            :disabled="single">详情</el-button>
+          <!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
+            :disabled="single">详情</el-button> -->
         </template>
         <template v-slot:plannedCapacity="{ row }">
           {{ row.plannedCapacity }}{{ row.plannedCapacityUnit ? row.plannedCapacityUnit : '' }}
@@ -39,6 +39,9 @@
           {{ row.averageDailyCapacity }}{{ row.plannedCapacityUnit ? row.plannedCapacityUnit : '' }}
         </template>
         <template v-slot:action="{ row }">
+          <el-link type="primary" :underline="false" @click="handleExport(row)">
+            详情
+          </el-link>
           <el-link type="primary" :underline="false" icon="el-icon-edit" @click="handleUpdate(row)">
             修改
           </el-link>
@@ -76,7 +79,8 @@
           </el-form-item>
           <el-form-item label="规划产能" prop="plannedCapacity">
             <div style="display: flex;align-items: center;justify-content: space-between;">
-              <el-input v-model="form.plannedCapacity" placeholder="请输入规划产能" style="width: calc(100% - 300px)" />
+              <el-input v-model="form.plannedCapacity" placeholder="请输入规划产能" style="width: calc(100% - 300px)"
+                @input="handleInput1" />
 
               <el-select v-model="form.measureType" placeholder="计量类型">
                 <el-option v-for="item in measureTypeList" :key="item.value" :label="item.label"
@@ -93,7 +97,7 @@
             </div>
           </el-form-item>
           <el-form-item label="工作日天数" prop="expandedCapacity">
-            <el-input v-model="form.expandedCapacity" placeholder="请输入工作日天数">
+            <el-input v-model="form.expandedCapacity" placeholder="请输入工作日天数" @input="handleInput2">
               <template v-slot:append>天</template>
             </el-input>
           </el-form-item>
@@ -105,17 +109,17 @@
           <el-button @click="cancel">取 消</el-button>
         </div>
       </el-dialog>
-      <el-dialog :title="titleDetail" :visible.sync="openDetail" width="75%" append-to-body>
-        <el-table v-loading="loading" :data="factory_capacity_detailList" @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center" />
+      <el-dialog :title="titleDetail" :visible.sync="openDetail" width="65%" append-to-body>
+        <el-table v-loading="loading" :data="factory_capacity_detailList" height="550">
+
           <el-table-column label="序号" align="center" prop="id" />
           <el-table-column label="年份" align="center" prop="year" />
           <el-table-column label="月份" align="center" prop="month" />
           <el-table-column label="日期" align="center" prop="day" />
           <el-table-column label="规划产能" align="center" prop="plannedCapacity" />
           <el-table-column label="已排产产能" align="center" prop="plannedSumCapacity" />
-          <el-table-column label="已排产单号" align="center" prop="plannedOrder" />
-          <el-table-column label="已排产产能" align="center" prop="plannedOrderCapacity" />
+          <el-table-column label="已排产单号" align="center" prop="plannedOrder" width="120" show-overflow-tooltip />
+          <el-table-column label="已排产产能" align="center" prop="plannedOrderCapacity" width="120" show-overflow-tooltip />
         </el-table>
       </el-dialog>
     </el-card>
@@ -243,7 +247,7 @@ export default {
         {
           columnKey: 'action',
           label: '操作',
-          width: 150,
+          width: 200,
           align: 'center',
           resizable: false,
           slot: 'action',
@@ -314,7 +318,8 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.queryParams.year = null;
+      this.queryParams.month = null;
       this.handleQuery();
     },
     // 多选框选中数据
@@ -372,23 +377,30 @@ export default {
       }).catch(() => { });
     },
     /** 导出按钮操作 */
-    handleExport() {
+    handleExport(row) {
       this.openDetail = true;
-      this.getDetailList();
+      this.getDetailList(row);
       // this.download('aps/capacity/export', {
       //   ...this.queryParams
       // }, `capacity_${new Date().getTime()}.xlsx`)
     },
     /** 查询工厂月产能定义列表 */
-    getDetailList() {
-      const ids = this.ids;
+    getDetailList(row) {
+      // const ids = this.ids;
+      console.log(row.id, 'dddd');
       this.loading = true;
-      listFactory_capacity_detail(this.queryParams).then(response => {
+      listFactory_capacity_detail({ factoriesId: row.factoriesId, year: row.year, month: row.month }).then(response => {
         this.factory_capacity_detailList = response.data;
         this.total = response.total;
         this.loading = false;
       });
     },
+    handleInput1(val) {
+      this.form.plannedCapacity = this.$handleInputPublicHasPoint(val);
+    },
+    handleInput2(val) {
+      this.form.expandedCapacity = this.$handleInputPublicHasPoint(val);
+    },
   }
 };
 </script>

+ 37 - 3
src/views/aps/presalesorder/index.vue

@@ -5,7 +5,7 @@
       <search ref="search" @search="reload"></search>
 
       <ele-pro-table ref="tableRef" :columns="columns" :datasource="datasource" :pageSize="20"
-        :pageSizes="[20, 30, 40, 50, 100]" row-key="id" @selection-change="handleSelectionChange" :initLoad="false"
+        :pageSizes="[20, 30, 40, 50, 100]" row-key="id" @selection-change="handleSelectionChange" :initLoad="false" @select="handleSelect"
         @done="onDone">
         <template v-slot:toolbar>
           <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleEstimatedDelivery">交期预估</el-button>
@@ -166,6 +166,13 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="编号" prop="productionCodes">
+                <el-input v-model="form.productionCodes" placeholder="请输入编号,用','隔开" />
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -278,7 +285,7 @@ export default {
         },
         {
           prop: 'preSalesOrderNumber',
-          label: '销售订单',
+          label: '销售订单',
           showOverflowTooltip: true,
           align: 'center',
           width: 140,
@@ -356,6 +363,13 @@ export default {
           align: 'center',
           width: 140,
         },
+        {
+          prop:'productionCodes',
+          label: '编号',
+          showOverflowTooltip: true,
+          align: 'center',
+          width: 140,
+        },
         {
           prop: 'factoriesName',
           label: '工厂名称',
@@ -419,6 +433,22 @@ export default {
     await this.getFactoryList();
   },
   methods: {
+    handleSelect(selection, row) {
+      const matchField = 'preSalesOrderNumber';
+      const isSelected = selection.some(item => item.id === row.id);
+      const list = this.$refs.tableRef.getData()
+      const matchedRows = list.filter(
+        item => item[matchField] === row[matchField]
+      )
+
+      // 批量设置选择状态
+      this.$nextTick(() => {
+        matchedRows.forEach(item => {
+          this.$refs.tableRef.toggleRowSelection(item, isSelected) 
+        })
+      })
+    },
+
     async getFactoryList() {
       const res = await getQueryFactory();
       console.log(res, 'data工厂')
@@ -460,7 +490,7 @@ export default {
       } else {
         ids = this.ids
       }
-      this.$confirm(`是否确认删除销售订单编号为"${ids}"的数据项?`, '提示')
+      this.$confirm(`是否确认删除该数据?`, '提示')
         .then(() => {
           delSalesorder({ ids: ids })
             .then(() => {
@@ -610,6 +640,7 @@ export default {
           this.$refs.uploadFile.clearFiles();
 
           this.upload.open = false;
+          this.reload();
         })
         .catch((data) => {
           if (data.code != -1) {
@@ -732,6 +763,9 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
+            if (this.form.productionCodes) {
+              this.form.productionCodes = this.form.productionCodes.replace(/,/g, ",")
+            }
             updateSalesorder(this.form).then(response => {
               this.$message.success("修改成功");
               this.open = false;

+ 23 - 16
src/views/aps_workday_schedule/schedule/index.vue

@@ -924,7 +924,9 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.queryParams.year=null;
+      this.queryParams.month=null;
+      // this.resetForm("queryForm");
       this.handleQuery();
     },
     // 多选框选中数据
@@ -991,22 +993,27 @@ export default {
     },
     // 用户状态修改
     handleStatusChange(row, index) {
-      eval("row.status=" + "row.day" + (index > 9 ? index : "0" + index));
-      let text = row.status === "0" ? "正常" : "休息";
-      var workDay = "day" + (index > 9 ? index : "0" + index);
-      this.$confirm('确认要"' + text + '""' + index + '"工作日状态吗?').then(function () {
-        var node = {
-          "sequenceId": row.sequenceId,
-          [workDay]: row.status,
-        }
+      const dayKey = 'day' + (index > 9 ? index : '0' + index);
+      const newStatus = row[dayKey] === 0 ? 0 : 1;
+      row[dayKey] = newStatus;
+      const text = newStatus === 0 ? "休息" : "正常";
+      this.$confirm(`确认要将第 ${index} 天设为 "${text}" 状态吗?`)
+        .then(() => {
+          const node = {
+            sequenceId: row.sequenceId,
+            [dayKey]: newStatus,
+          };
+          return updateSchedule(node);
+        })
+        .then(() => {
+          this.$message.success(text + "成功");
+          this.getList();
+        })
+        .catch(() => {
+          row[dayKey] = newStatus == 0 ? 1 : 0;
+        });
+    }
 
-        return updateSchedule(node);
-      }).then(() => {
-        this.$message.success(text + "成功");
-      }).catch(function () {
-        row.status = row.status === "0" ? "1" : "0";
-      });
-    },
   }
 };
 </script>

+ 27 - 8
src/views/cuttingPlan/index.vue

@@ -70,6 +70,13 @@
 
     <planEditDialog ref="planEditDialogRef" @success="reload" />
     <producePlan ref="produceRef" @success="reload"></producePlan>
+    <process-submit-dialog
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+      :isNotNeedProcess="false"
+    ></process-submit-dialog>
   </div>
 </template>
 
@@ -81,13 +88,13 @@ import planEditDialog from './components/plan-edit-dialog.vue';
 import producePlan from './components/producePlan.vue';
 
 import detail from '@/views/materialPlan/components/detail.vue';
-
+import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
 import { getList, del, submit } from '@/api/cuttingPlan/index.js';
 
 export default {
   components: {
     cuttingPlanSearch,
-
+    processSubmitDialog,
     detail,
     planEditDialog,
     producePlan
@@ -99,7 +106,7 @@ export default {
 
       // 加载状态
       loading: false,
-
+      processSubmitDialogFlag:false,
       statusOpt: {
         first: [
           { label: '所有状态', value: null },
@@ -305,12 +312,24 @@ export default {
     },
 
     todo(row) {
-      submit({ businessId: row.id }).then((res) => {
-        if (res) {
-          this.$message.success('提交成功!');
-          this.reload();
-        }
+      this.processSubmitDialogFlag = true;
+      this.$nextTick(() => {
+        let params = {
+          businessId: row.id,
+          businessKey: 'baiting_code',
+          formCreateUserId: row.createUserId,
+          variables: {
+            businessCode: row.code
+          }
+        };
+        this.$refs.processSubmitDialogRef.init(params);
       });
+      // submit({ businessId: row.id }).then((res) => {
+      //   if (res) {
+      //     this.$message.success('提交成功!');
+      //     this.reload();
+      //   }
+      // });
     }
   }
 };

+ 8 - 7
src/views/materialPlan/components/produceOrder.vue

@@ -369,12 +369,13 @@ export default {
 
     /* 刷新表格 */
     reload(where) {
-      if (where != undefined && where.status.length > 0) {
-        this.$nextTick(() => {
-          if (this.$refs.table && this.$refs.table.reload)
-            this.$refs.table.reload({ page: 1, where: where });
-        })
-      }
+      this.$nextTick(() => {
+        if (this.$refs.table && this.$refs.table.reload)
+          this.$refs.table.reload({ page: 1, where: where });
+      })
+      // if (where != undefined && where.status.length > 0) {
+      //
+      // }
     },
 
     handleClose() {
@@ -416,4 +417,4 @@ export default {
   text-align: center;
   padding: 10px 0;
 }
-</style>
+</style>

+ 27 - 6
src/views/materialPlan/index.vue

@@ -87,6 +87,13 @@
     <producePlan ref="produceRef" @success="reload"></producePlan>
 
     <detail ref="detailRef"></detail>
+    <process-submit-dialog
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+      :isNotNeedProcess="false"
+    ></process-submit-dialog>
   </div>
 </template>
 
@@ -94,6 +101,7 @@
 import materialPlanSearch from './components/materialPlan-search.vue';
 import planEditDialog from './components/plan-edit-dialog.vue';
 import producePlan from './components/producePlan.vue';
+import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
 
 import detail from './components/detail.vue';
 import { getList, del, submit } from '@/api/materialPlan/index';
@@ -102,7 +110,7 @@ export default {
     planEditDialog,
     materialPlanSearch,
     detail,
-    producePlan
+    producePlan,processSubmitDialog
   },
 
   data() {
@@ -111,6 +119,7 @@ export default {
 
       // 加载状态
       loading: false,
+      processSubmitDialogFlag: false,
 
       statusOpt: {
         first: [
@@ -322,12 +331,24 @@ export default {
     },
 
     todo(row) {
-      submit({ businessId: row.id }).then((res) => {
-        if (res) {
-          this.$message.success('提交成功!');
-          this.reload();
-        }
+      this.processSubmitDialogFlag = true;
+      this.$nextTick(() => {
+        let params = {
+          businessId: row.id,
+          businessKey: 'release_purchase_plan',
+          formCreateUserId: row.createUserId,
+          variables: {
+            businessCode: row.code
+          }
+        };
+        this.$refs.processSubmitDialogRef.init(params);
       });
+      // submit({ businessId: row.id }).then((res) => {
+      //   if (res) {
+      //     this.$message.success('提交成功!');
+      //     this.reload();
+      //   }
+      // });
     },
 
     handleTabChange() {