小小儁爺
2025-03-27 768d890a8ecd901cff555ec4c82d107be7905add
1.批量报工 功能新增
已修改6个文件
8538 ■■■■■ 文件已修改
src/api/WorkOrder.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicSettings.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 156 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/produce/stepReport2.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/workOrder/workOrderList.vue 721 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/workOrder/workOrderList_back.vue 7583 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/WorkOrder.js
@@ -339,3 +339,21 @@
  })
}
// MES工单批量绑定获取工序数据
export function UpdateMesOrderStepListSearch(data) {
  return request({
    url: 'WorkOrder/UpdateMesOrderStepListSearch',
    method: 'post',
    data
  })
}
// MES工单新增、编辑批量绑定提交
export function AddUpdateMesOrderList(data) {
  return request({
    url: 'WorkOrder/AddUpdateMesOrderList?OperType=Update',
    method: 'post',
    data
  })
}
src/api/basicSettings.js
@@ -515,3 +515,21 @@
  })
}
// äº§å“ç¼–码批量查找关联的工艺信息
export function PartSelectRputeList(data) {
  return request({
    url: 'BasicSetting/PartSelectRputeList',
    method: 'post',
    data
  })
}
// æ ¹æ®å·¥è‰ºä¿¡æ¯(工艺路线编码)批量查找关联工序集合
export function RouteSelectStepList(data) {
  return request({
    url: 'BasicSetting/RouteSelectStepList',
    method: 'post',
    data
  })
}
src/router/index.js
@@ -109,40 +109,40 @@
    children: [
      {
        path: 'organizationList',
        name: 'OrganizationList',
        name: 'OrCancleganizationList',
        code: '0101',
        component: () => import('@/views/basicSettings/organizationList'),
        meta: { code: '0101', title: '组织架构', icon: '', keepAlive: true }
      },
      {
        path: 'postList',
        name: 'PersonList',
        name: 'PeCanclersonList',
        code: '0102',
        component: () => import('@/views/basicSettings/postList'),
        meta: { code: '0102', title: '岗位管理', icon: '', keepAlive: true }
      }, {
        path: 'groupList',
        name: 'GroupList',
        name: 'GrCancleoupList',
        code: '0103',
        component: () => import('@/views/basicSettings/groupList'),
        meta: { code: '0103', title: '班组管理', icon: '', keepAlive: true }
      },
      {
        path: 'personList',
        name: 'PersonList',
        name: 'PeCanclersonList',
        code: '0104',
        component: () => import('@/views/basicSettings/personList'),
        meta: { code: '0104', title: '人员管理', icon: '', keepAlive: true }
      }, {
        path: 'roleList',
        name: 'RoleList',
        name: 'RoCancleleList',
        code: '0105',
        component: () => import('@/views/basicSettings/roleList'),
        meta: { code: '0105', title: '角色管理', icon: '', keepAlive: true }
      },
      {
        path: 'powerDivider',
        name: 'PowerDivider',
        name: 'PoCanclewerDivider',
        code: '0110',
        component: () => import('@/views/basicSettings/powerDivider'),
        meta: { code: '0110', title: '权限分配', icon: '', keepAlive: true }
@@ -150,56 +150,56 @@
      {
        path: 'roleDivider',
        name: 'RoleDivider',
        code: '0111',
        code: '01Cancle11',
        hidden: true,
        component: () => import('@/views/basicSettings/roleDivider'),
        meta: { code: '0111', title: '角色分配', icon: '', keepAlive: true }
      }, {
        path: 'contactUnitList',
        name: 'ContactUnitList',
        name: 'CoCanclentactUnitList',
        code: '0106',
        component: () => import('@/views/basicSettings/contactUnitList'),
        meta: { code: '0106', title: '往来单位', icon: '', keepAlive: true }
      }, {
        path: 'warehouseList',
        name: 'WarehouseList',
        name: 'WaCanclerehouseList',
        code: '0107',
        component: () => import('@/views/basicSettings/warehouseList'),
        meta: { code: '0107', title: '仓库设置', icon: '', keepAlive: true }
      }, {
        path: 'storageList',
        name: 'StorageList',
        name: 'StCancleorageList',
        code: '0108',
        component: () => import('@/views/basicSettings/storageList'),
        meta: { code: '0108', title: '库位设置', icon: '', keepAlive: true }
      }, {
        path: 'installLampList',
        name: 'InstallLampList',
        name: 'InCanclestallLampList',
        code: '0109',
        component: () => import('@/views/basicSettings/installLampList'),
        meta: { code: '0109', title: '安灯设置', icon: '', keepAlive: true }
      }, {
        path: 'processList',
        name: 'ProcessList',
        name: 'PrCancleocessList',
        code: '0112',
        component: () => import('@/views/basicSettings/processList'),
        meta: { code: '0112', title: '工序设置', icon: '', keepAlive: true }
      }, {
        path: 'cronTime',
        name: 'CronTime',
        name: 'CrCancleonTime',
        code: '0113',
        component: () => import('@/views/basicSettings/cronTime'),
        meta: { code: '0113', title: '定时任务', icon: '', keepAlive: true }
      }, {
        path: 'processRoute',
        name: 'ProcessRoute',
        name: 'PrCancleocessRoute',
        code: '0114',
        component: () => import('@/views/basicSettings/processRoute'),
        meta: { code: '0114', title: '工艺路线', icon: '', keepAlive: true }
      },
      {
        path: 'meterPrice',
        name: 'MeterPrice',
        name: 'MeCancleterPrice',
        code: '0115',
        component: () => import('@/views/basicSettings/meterPrice'),
        meta: { code: '0115', title: '工价设置', icon: '', keepAlive: true }
@@ -219,32 +219,32 @@
    children: [
      {
        path: 'unitList',
        name: 'UnitList',
        name: 'UnCancleitList',
        code: '0201',
        component: () => import('@/views/materialManager/unitList'),
        meta: { code: '0201', title: '计量单位', icon: '', keepAlive: true }
      },
      {
        path: 'inventoryList',
        name: 'InventoryList',
        name: 'InCancleventoryList',
        code: '0202',
        component: () => import('@/views/materialManager/inventoryList'),
        meta: { code: '0202', title: '存货档案', icon: '', keepAlive: true }
      }, {
        path: 'materialList',
        name: 'MaterialList',
        name: 'MaCancleterialList',
        code: '0203',
        component: () => import('@/views/materialManager/materialList'),
        meta: { code: '0203', title: '物料清单', icon: '', keepAlive: true }
      }, {
        path: 'unitList2',
        name: 'UnitList2',
        name: 'UnCancleitList2',
        code: '0204',
        component: () => import('@/views/materialManager/unitList2'),
        meta: { code: '0204', title: '计量单位', icon: '', keepAlive: true }
      }, {
        path: 'inventoryList2',
        name: 'InventoryList2',
        name: 'InCancleventoryList2',
        code: '0205',
        component: () => import('@/views/materialManager/inventoryList2'),
        meta: { code: '0205', title: '存货档案', icon: '', keepAlive: true }
@@ -264,56 +264,56 @@
    children: [
      {
        path: 'deviceList',
        name: 'DeviceList',
        name: 'DeCancleviceList',
        code: '0301',
        component: () => import('@/views/deviceManager/deviceList'),
        meta: { code: '0301', title: '设备清单', icon: '', keepAlive: true }
      },
      {
        path: 'checkStandard',
        name: 'CheckStandard',
        name: 'ChCancleeckStandard',
        code: '0302',
        component: () => import('@/views/deviceManager/checkStandard'),
        meta: { code: '0302', title: '点检标准', icon: '', keepAlive: true }
      },
      {
        path: 'checkPosition',
        name: 'CheckPosition',
        name: 'ChCancleeckPosition',
        code: '0303',
        component: () => import('@/views/deviceManager/checkPosition'),
        meta: { code: '0303', title: '点检部位', icon: '', keepAlive: true }
      },
      {
        path: 'maintainStandard',
        name: 'MaintainStandard',
        name: 'MaCancleintainStandard',
        code: '0304',
        component: () => import('@/views/deviceManager/maintainStandard'),
        meta: { code: '0304', title: '保养标准', icon: '', keepAlive: true }
      },
      {
        path: 'maintainPosition',
        name: 'MaintainPosition',
        name: 'MaCancleintainPosition',
        code: '0305',
        component: () => import('@/views/deviceManager/maintainPosition'),
        meta: { code: '0305', title: '保养部位', icon: '', keepAlive: true }
      },
      {
        path: 'checkRecord',
        name: 'CheckRecord',
        name: 'ChCancleeckRecord',
        code: '0306',
        component: () => import('@/views/deviceManager/checkRecord'),
        meta: { code: '0306', title: '点检记录', icon: '', keepAlive: true }
      },
      {
        path: 'maintainRecord',
        name: 'MaintainRecord',
        name: 'MaCancleintainRecord',
        code: '0307',
        component: () => import('@/views/deviceManager/maintainRecord'),
        meta: { code: '0307', title: '保养记录', icon: '', keepAlive: true }
      },
      {
        path: 'repairRecord',
        code: '0308',
        code: '03Cancle08',
        name: 'RepairRecord',
        component: () => import('@/views/deviceManager/repairRecord'),
        meta: { code: '0308', title: '维修记录', icon: '', keepAlive: true }
@@ -332,67 +332,67 @@
    children: [
      {
        path: 'mouldList',
        name: 'MouldList',
        name: 'MoCancleuldList',
        code: '0901',
        component: () => import('@/views/mouldManager/mouldList'),
        meta: { code: '0901', title: '模具清单', icon: '', keepAlive: true }
      }, {
        path: 'mouldCheckPos',
        name: 'MouldCheckPos',
        name: 'MouCancleldCheckPos',
        code: '0902',
        component: () => import('@/views/mouldManager/mouldCheck'),
        meta: { code: '0902', title: '模具点检项', icon: '', keepAlive: true }
      }, {
        path: 'mouldCheckStand',
        name: 'MouldCheckStand',
        name: 'MoulCancledCheckStand',
        code: '0903',
        component: () => import('@/views/mouldManager/mouldCheckStand'),
        meta: { code: '0903', title: '模具点检标准', icon: '', keepAlive: true }
      }, {
        path: 'mouldMaintain',
        name: 'MouldMaintain',
        name: 'MouCancleldMaintain',
        code: '0904',
        component: () => import('@/views/mouldManager/mouldMaintain'),
        meta: { code: '0904', title: '模具保养项', icon: '', keepAlive: true }
      }, {
        path: 'mouldMaintainStand',
        name: 'MouldMaintainStand',
        name: 'MoulCancledMaintainStand',
        code: '0905',
        component: () => import('@/views/mouldManager/mouldMaintainStand'),
        meta: { code: '0905', title: '模具保养标准', icon: '', keepAlive: true }
      }, {
        path: 'mouldCheckRecord',
        name: 'mouldCheckRecord',
        name: 'moulCancledCheckRecord',
        code: '0906',
        component: () => import('@/views/mouldManager/mouldCheckRecord'),
        meta: { code: '0906', title: '模具点检记录', icon: '', keepAlive: true }
      }, {
        path: 'mouldMaintainRecord',
        name: 'MouldMaintainRecord',
        name: 'MoulCancledMaintainRecord',
        code: '0907',
        component: () => import('@/views/mouldManager/mouldMaintainRecord'),
        meta: { code: '0907', title: '模具保养记录', icon: '', keepAlive: true }
      }, {
        path: 'mouldRepairRecord',
        name: 'MouldRepairRecord',
        name: 'MoulCancledRepairRecord',
        code: '0908',
        component: () => import('@/views/mouldManager/mouldRepairRecord'),
        meta: { code: '0908', title: '模具维修记录', icon: '', keepAlive: true }
      }, {
        path: 'mouldUpDownRecord',
        name: 'MouldUpDownRecord',
        name: 'MouldCancleUpDownRecord',
        code: '0909',
        component: () => import('@/views/mouldManager/mouldUpDownRecord'),
        meta: { code: '0909', title: '模具上下机记录', icon: '', keepAlive: true }
      }, {
        path: 'mouldOutInRecord',
        name: 'MouldOutInRecord',
        name: 'MouldCancleOutInRecord',
        code: '0910',
        component: () => import('@/views/mouldManager/mouldOutInRecord'),
        meta: { code: '0910', title: '模具出入库记录', icon: '', keepAlive: true }
      }, {
        path: 'mouldCirculateRecord',
        name: 'MouldCirculateRecord',
        name: 'MoulCancledCirculateRecord',
        code: '0911',
        component: () => import('@/views/mouldManager/mouldCirculateRecord'),
        meta: { code: '0911', title: '模具借还记录', icon: '', keepAlive: true }
@@ -411,32 +411,32 @@
    children: [
      {
        path: 'defectDefine',
        name: 'DefectDefine',
        name: 'DeCanclefectDefine',
        code: '0401',
        component: () => import('@/views/qualityManager/defectDefine'),
        meta: { code: '0401', title: '缺陷定义', icon: '', keepAlive: true }
      },
      {
        path: 'processCheckItem',
        name: 'ProcessCheckItem',
        name: 'ProCanclecessCheckItem',
        code: '0402',
        component: () => import('@/views/qualityManager/processCheckItem'),
        meta: { code: '0402', title: '检验项设置', icon: '', keepAlive: true }
      }, {
        path: 'qualityPlaning',
        name: 'QualityPlaning',
        name: 'QuCanclealityPlaning',
        code: '0403',
        component: () => import('@/views/qualityManager/qualityPlaning'),
        meta: { code: '0403', title: '质检方案', icon: '', keepAlive: true }
      }, {
        path: 'processCheck',
        name: 'ProcessCheck',
        name: 'PrCancleocessCheck',
        code: '0404',
        component: () => import('@/views/qualityManager/processCheck'),
        meta: { code: '0404', title: '工序检验', icon: '', keepAlive: true }
      }, {
        path: 'processCheckRecord',
        name: 'ProcessCheckRecord',
        name: 'PrCancleocessCheckRecord',
        code: '0405',
        component: () => import('@/views/qualityManager/processCheckRecord'),
        meta: { code: '0405', title: '工序检验', icon: '', keepAlive: true }
@@ -455,27 +455,27 @@
    children: [
      {
        path: 'produceOrderList',
        name: 'ProduceOrderList',
        name: 'ProCancleduceOrderList',
        code: '0501',
        component: () => import('@/views/workOrder/produceOrderList'),
        meta: { code: '0501', title: 'ERP订单', icon: '', keepAlive: true }
      },
      {
        path: 'workOrderList',
        name: 'WorkOrderList',
        name: 'WorCanclekOrderList',
        code: '0502',
        component: () => import('@/views/workOrder/workOrderList'),
        meta: { code: '0502', title: 'MES工单', icon: '', keepAlive: true }
      },
      {
        path: 'workOrderSend',
        name: 'WorkOrderSend',
        name: 'WoCanclerkOrderSend',
        code: '0503',
        component: () => import('@/views/workOrder/workOrderSend'),
        meta: { code: '0503', title: '工单派发', icon: '', keepAlive: true }
      }, {
        path: 'workOrderClose',
        name: 'WorkOrderClose',
        name: 'WoCanclerkOrderClose',
        code: '0504',
        component: () => import('@/views/workOrder/workOrderClose'),
        meta: { code: '0504', title: '工单关闭', icon: '', keepAlive: true }
@@ -495,39 +495,39 @@
    children: [
      {
        path: 'stepReport',
        name: 'StepReport',
        name: 'StCancleepReport',
        code: '0601',
        component: () => import('@/views/produce/stepReport'),
        meta: { code: '0601', title: '工序报工', icon: '', keepAlive: true }
      },
      {
        path: 'stepReport2',
        name: 'StepReport2',
        name: 'StCancleepReport2',
        code: '0606',
        component: () => import('@/views/produce/stepReport2'),
        meta: { code: '0606', title: '工序报工', icon: '', keepAlive: true }
      },
      {
        path: 'reportCorrect',
        name: 'ReportCorrect',
        name: 'ReCancleportCorrect',
        code: '0602',
        component: () => import('@/views/produce/reportCorrect'),
        meta: { code: '0602', title: '报工调整', icon: '', keepAlive: true }
      }, {
        path: 'reportVerify',
        name: 'ReportVerify',
        name: 'ReCancleportVerify',
        code: '0603',
        component: () => import('@/views/produce/reportVerify'),
        meta: { code: '0603', title: '报工审核', icon: '', keepAlive: true }
      }, {
        path: 'productWarehouse',
        name: 'productWarehouse',
        name: 'prodCancleuctWarehouse',
        code: '0604',
        component: () => import('@/views/produce/productWarehouse'),
        meta: { code: '0604', title: 'T8生产入库', icon: '', keepAlive: true }
      }, {
        path: 'productWarehouse2',
        name: 'productWarehouse2',
        name: 'prodCancleuctWarehouse2',
        code: '0605',
        component: () => import('@/views/produce/productWarehouse2'),
        meta: { code: '0605', title: 'T+生产入库', icon: '', keepAlive: true }
@@ -547,79 +547,79 @@
    children: [
      {
        path: 'reportList',
        name: 'ReportList',
        name: 'ReCancleportList',
        code: '1040',
        component: () => import('@/views/statistic/reportList'),
        meta: { code: '1040', title: '报工记录', icon: '', keepAlive: true }
      },
      {
        path: 'monthReport',
        name: 'MonthReport',
        name: 'MoCanclenthReport',
        code: '1041',
        component: () => import('@/views/statistic/monthReport'),
        meta: { code: '1041', title: '月度统计', icon: '', keepAlive: true }
      }, {
        path: 'workOrderProcess',
        name: 'WorkOrderProcess',
        name: 'WoCanclerkOrderProcess',
        code: '0701',
        component: () => import('@/views/statistic/workOrderProcess'),
        meta: { code: '0701', title: '生产进度', icon: '', keepAlive: true }
      }, {
        path: 'inProcessList',
        name: 'InProcessList',
        name: 'InCancleProcessList',
        code: '1043',
        component: () => import('@/views/statistic/inProcessList'),
        meta: { code: '1043', title: '在制列表', icon: '', keepAlive: true }
      },
      {
        path: 'groupSalaryList',
        name: 'GroupSalaryList',
        name: 'GroupSCanclealaryList',
        code: '0702',
        component: () => import('@/views/statistic/groupSalaryList'),
        meta: { code: '0702', title: '班组工资统计报表', icon: '', keepAlive: true }
      },
      {
        path: 'personSalaryList',
        name: 'PersonSalaryList',
        name: 'PersonCancleSalaryList',
        code: '0703',
        component: () => import('@/views/statistic/personSalaryList'),
        meta: { code: '0703', title: '人员工资统计报表', icon: '', keepAlive: true }
      }, {
        path: 'subcontractingOperation',
        name: 'SubcontractingOperation',
        name: 'SubconCancletractingOperation',
        code: '0704',
        component: () => import('@/views/statistic/subcontractingOperation'),
        meta: { code: '0704', title: '委外工序明细报表', icon: '', keepAlive: true }
      }, {
        path: 'defectDetailList',
        name: 'DefectDetailList',
        name: 'DefeCanclectDetailList',
        code: '0705',
        component: () => import('@/views/statistic/defectDetailList'),
        meta: { code: '0705', title: '不良明细报表', icon: '', keepAlive: true }
      }, {
        path: 'repairDetailList',
        name: 'RepairDetailList',
        name: 'RepaCancleirDetailList',
        code: '0706',
        component: () => import('@/views/statistic/repairDetailList'),
        meta: { code: '0706', title: '维修明细报表', icon: '', keepAlive: true }
      },
      {
        path: 'installationLampList',
        name: 'InstallationLampList',
        name: 'InCanclestallationLampList',
        code: '0707',
        component: () => import('@/views/statistic/installationLampList'),
        meta: { code: '0707', title: '安灯报表', icon: '', keepAlive: true }
      },
      {
        path: 'storageRecord',
        name: 'storageRecord',
        name: 'stCancleorageRecord',
        code: '0708',
        component: () => import('@/views/statistic/storageRecord'),
        meta: { code: '0708', title: '入库记录', icon: '', keepAlive: true }
      },
      {
        path: 'storageRecord2',
        name: 'storageRecord2',
        name: 'stCancleorageRecord2',
        code: '0709',
        component: () => import('@/views/statistic/storageRecord2'),
        meta: { code: '0709', title: '入库记录', icon: '', keepAlive: true }
@@ -639,20 +639,20 @@
    children: [
      {
        path: 'sopDevice',
        name: 'SopDevice',
        name: 'SopCancleDevice',
        code: '1001',
        component: () => import('@/views/sopManager/sopDevice'),
        meta: { code: '1001', title: '设备SOP', icon: '', keepAlive: true }
      },
      {
        path: 'sopRoute',
        name: 'SopRoute',
        name: 'SopCancleRoute',
        code: '1002',
        component: () => import('@/views/sopManager/sopRoute'),
        meta: { code: '1002', title: '工艺SOP', icon: '', keepAlive: true }
      }, {
        path: 'sopWorkOrder',
        name: 'SopWorkOrder',
        name: 'SopCancleWorkOrder',
        code: '1003',
        component: () => import('@/views/sopManager/sopWorkOrder'),
        meta: { code: '1003', title: '单据SOP', icon: '', keepAlive: true }
@@ -672,28 +672,28 @@
    children: [
      {
        path: 'menuList',
        name: 'MenuList',
        name: 'MeCanclenuList',
        code: '0801',
        component: () => import('@/views/systemSetting/menuList'),
        meta: { code: '0801', title: '菜单管理', icon: '', keepAlive: true }
      },
      {
        path: 'reportList',
        name: 'ReportList',
        name: 'ReCancleportList',
        code: '0802',
        component: () => import('@/views/systemSetting/encodingRules'),
        meta: { code: '0802', title: '编码规则', icon: '', keepAlive: true }
      },
      {
        path: 'dataImport',
        name: 'DataImport',
        name: 'DaCancletaImport',
        code: '0803',
        component: () => import('@/views/systemSetting/dataImport'),
        meta: { code: '0803', title: '数据导入', icon: '', keepAlive: true }
      },
      {
        path: 'processSetting',
        name: 'ProcessSetting',
        name: 'PrCancleocessSetting',
        code: '0804',
        component: () => import('@/views/systemSetting/processSetting'),
        meta: { code: '0804', title: '流转设置', icon: '', keepAlive: true }
@@ -712,35 +712,35 @@
    children: [
      {
        path: 'attendanceSettings',
        name: 'AttendanceSettings',
        name: 'AtCancletendanceSettings',
        code: '1101',
        component: () => import('@/views/attendanceModule/attendanceSettings'),
        meta: { code: '1101', title: '考勤设置', icon: '', keepAlive: true }
      },
      {
        path: 'attendanceClockIn',
        name: 'AttendanceClockIn',
        name: 'AtCancletendanceClockIn',
        code: '1102',
        component: () => import('@/views/attendanceModule/attendanceClockIn'),
        meta: { code: '1102', title: '考勤打卡', icon: '', keepAlive: true }
      },
      {
        path: 'attendanceRecord',
        name: 'AttendanceRecord',
        name: 'AtCancletendanceRecord',
        code: '1103',
        component: () => import('@/views/attendanceModule/attendanceRecord'),
        meta: { code: '1103', title: '考勤记录', icon: '', keepAlive: true }
      },
      {
        path: 'attendanceDay',
        name: 'AttendanceDay',
        name: 'AttCancleendanceDay',
        code: '1104',
        component: () => import('@/views/attendanceModule/attendanceDay'),
        meta: { code: '1104', title: '日计时工资', icon: '', keepAlive: true }
      },
      {
        path: 'attendanceMonth',
        name: 'AttendanceMonth',
        name: 'AttCancleendanceMonth',
        code: '1105',
        component: () => import('@/views/attendanceModule/attendanceMonth'),
        meta: { code: '1105', title: '月计时工资', icon: '', keepAlive: true }
src/views/produce/stepReport2.vue
@@ -472,27 +472,27 @@
          <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^\d]/g,'')" style="width: 200px" />
        </el-form-item>
        <el-form-item
          v-if="(activeName==='生产列表'||activeName==='外协收料')&&rowData.isend === 'Y'"
          prop="stockcode"
          label="入库仓库"
          class="dialogFormItem"
        >
          <el-select
            v-model="dialogForm.stockcode"
            style="width:200px"
            placeholder="请选择"
            filterable
            :popper-append-to-body="false"
          >
            <el-option
              v-for="item in WareHouseArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
            />
          </el-select>
        </el-form-item>
        <!--        <el-form-item-->
        <!--          v-if="(activeName==='生产列表'||activeName==='外协收料')&&rowData.isend === 'Y'"-->
        <!--          prop="stockcode"-->
        <!--          label="入库仓库"-->
        <!--          class="dialogFormItem"-->
        <!--        >-->
        <!--          <el-select-->
        <!--            v-model="dialogForm.stockcode"-->
        <!--            style="width:200px"-->
        <!--            placeholder="请选择"-->
        <!--            filterable-->
        <!--            :popper-append-to-body="false"-->
        <!--          >-->
        <!--            <el-option-->
        <!--              v-for="item in WareHouseArr"-->
        <!--              :key="item.code"-->
        <!--              :label="item.name"-->
        <!--              :value="item.code"-->
        <!--            />-->
        <!--          </el-select>-->
        <!--        </el-form-item>-->
        <el-form-item v-if="activeName==='外协发料'||activeName==='外协收料'" prop="wxcode" label="外协供方" class="dialogFormItem">
          <el-select
src/views/workOrder/workOrderList.vue
@@ -8,7 +8,11 @@
          <el-button v-waves type="success" icon="el-icon-connection" @click="send">派发</el-button>
        </div>
        <!--        <el-button v-waves icon="el-icon-switch-button" @click="orderClose">关闭工单</el-button>-->
        <el-button v-waves type="primary" @click="batchUpdate"><i
          class="el-icon-edit"
          style="margin-right: 0;"
        /> æ‰¹é‡ç»‘定
        </el-button>
      </div>
      <div class="bodyTopFormGroup">
@@ -175,6 +179,20 @@
              <div v-if="row.status==='SCHED'">已排程</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="isstep"
            label="工艺状态"
            sortable="custom"
            width="110"
            show-tooltip-when-overflow
          >
            <template slot-scope="{row}">
              <el-tag v-if="row.isstep==='Y'" type="success" size="mini">已绑定</el-tag>
              <el-tag v-if="row.isstep==='N'" type="danger" size="mini">未绑定</el-tag>
            </template>
          </el-table-column>
          <el-table-column
            prop="wo_code"
            label="工单编号"
@@ -267,6 +285,66 @@
            show-tooltip-when-overflow
            width="100"
          />
          <!--          <el-table-column-->
          <!--            prop="priuserdefnvc1"-->
          <!--            label="客户名称"-->
          <!--            width="110"-->
          <!--            sortable="custom"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              {{ row.priuserdefnvc1 ? row.priuserdefnvc1 : '/' }}-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          <el-table-column-->
          <!--            prop="priuserdefnvc6"-->
          <!--            label="客户编码"-->
          <!--            width="110"-->
          <!--            sortable="custom"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              {{ row.priuserdefnvc6 ? row.priuserdefnvc6 : '/' }}-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          <el-table-column-->
          <!--            prop="priuserdefnvc2"-->
          <!--            label="对内名称"-->
          <!--            width="110"-->
          <!--            sortable="custom"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              {{ row.priuserdefnvc2 ? row.priuserdefnvc2 : '/' }}-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          <el-table-column-->
          <!--            prop="priuserdefnvc3"-->
          <!--            label="CTP日期"-->
          <!--            width="110"-->
          <!--            sortable="custom"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              {{ row.priuserdefnvc3 ? row.priuserdefnvc3 : '/' }}-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          <el-table-column-->
          <!--            prop="priuserdefnvc4"-->
          <!--            label="钢刀编号"-->
          <!--            width="110"-->
          <!--            sortable="custom"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              {{ row.priuserdefnvc4 ? row.priuserdefnvc4 : '/' }}-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          <el-table-column-->
          <!--            prop="priuserdefnvc5"-->
          <!--            label="盒型"-->
          <!--            width="110"-->
          <!--            sortable="custom"-->
          <!--          >-->
          <!--            <template slot-scope="{row}">-->
          <!--              {{ row.priuserdefnvc5 ? row.priuserdefnvc5 : '/' }}-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <el-table-column
            prop="clerkuser"
            label="销售业务员"
@@ -385,7 +463,7 @@
                    :style="{color:$store.state.settings.theme}"
                    class="el-icon-printer"
                    style="cursor: pointer;margin-right: 15px"
                    @click="handlePrint(row.wo_code,row.saleOrderCod)"
                    @click="handlePrint(row.wo_code,row.saleOrderCod,row)"
                  />
                </el-tooltip>
@@ -497,6 +575,11 @@
            label="料废数量"
            show-tooltip-when-overflow
            prop="materielbad_qty"
          />
          <el-table-column
            label="总可报数量"
            show-tooltip-when-overflow
            prop="plan_qty"
          />
          <el-table-column
            label="待产数量"
@@ -647,8 +730,8 @@
            :popper-append-to-body="false"
            style="width: 200px;"
            placeholder="请选择车间"
            @change="getMesOrderNewStepContent"
          >
            <!--            @change="getMesOrderNewStepContent"-->
            <!--            @change="sourceType? getMesOrderNewStepContent():routecodeChange()"-->
            <el-option
              v-for="item in wkshopArr"
@@ -1373,6 +1456,26 @@
                  <el-form-item label="工单数量:" class="formContent">
                    {{ formApprove.plan_qty }}
                  </el-form-item>
                  <!--                  <el-form-item label="客户名称:" class="formContent">-->
                  <!--                    {{ formApprove.priuserdefnvc1 }}-->
                  <!--                  </el-form-item>-->
                  <!--                  <el-form-item label="客户编码:" class="formContent">-->
                  <!--                    {{ formApprove.priuserdefnvc6 }}-->
                  <!--                  </el-form-item>-->
                  <!--                  <el-form-item label="对内名称:" class="formContent">-->
                  <!--                    {{ formApprove.priuserdefnvc2 }}-->
                  <!--                  </el-form-item>-->
                  <!--                  <el-form-item label="CTP日期:" class="formContent">-->
                  <!--                    {{ formApprove.priuserdefnvc3 }}-->
                  <!--                  </el-form-item>-->
                  <!--                  <el-form-item label="钢刀编号:" class="formContent">-->
                  <!--                    {{ formApprove.priuserdefnvc4 }}-->
                  <!--                  </el-form-item>-->
                  <!--                  <el-form-item label="盒型:" class="formContent">-->
                  <!--                    {{ formApprove.priuserdefnvc5 }}-->
                  <!--                  </el-form-item>-->
                  <!--                <el-form-item label="工艺路线:" class="formContent">-->
                  <!--                  {{ formApprove.routename }}-->
                  <!--                </el-form-item>-->
@@ -2256,6 +2359,255 @@
      </span>
    </el-dialog>
    <!--   æ‰¹é‡ä¿®æ”¹-->
    <el-dialog
      v-el-drag-dialog
      title="批量修改"
      :visible.sync="dialogVisibleBatchUpdate"
      width="1200px"
      top="8vh"
      :close-on-click-modal="false"
      @closed="handleCloseBatchUpdate"
      @close="handleCloseBatchUpdate"
    >
      <div
        v-if="formData3.filter(i => !i.routecode).length>0&&mesSetting.route"
        style="display: flex;align-items: center"
      >
        <div style="height: 34px;width: 80%;margin-bottom: 10px;">
          <el-alert
            :title="'当前选中'+multipleSelection.length+'个工单,有'+(formData3.filter(i => !i.routecode).length)+'个工单未指定工艺路线,请先指定!'"
            type="error"
            :closable="false"
          />
        </div>
        <el-button
          v-waves
          type="text"
          style="margin-left: 20px;"
          @click="dialogVisibleBatchUpdate=false;$router.push('../materialManager/inventoryList2')"
        >点击跳转存货绑定工艺
        </el-button>
      </div>
      <div v-for="(i,index) in formData3" :key="index" class="customDiv">
        <el-form
          ref="dialogForm"
          inline
          :model="i"
          label-width="110px"
        >
          <el-divider content-position="left">基本信息 {{ index + 1 }}</el-divider>
          <el-form-item
            label="工单状态"
            prop="mesorderstus"
          >
            <div style="width: 200px;">{{ erporderstusArr.find(item => item.code === i.mesorderstus).name }}</div>
          </el-form-item>
          <el-form-item label="工单编号" prop="mesordercode">
            <div style="width: 200px;">{{ i.mesordercode }}</div>
          </el-form-item>
          <el-form-item label="工单类型" prop="mesorderstus">
            <div style="width: 200px;">{{ ordertypeArr.find(item => item.code === i.ordertype).name }}</div>
          </el-form-item>
          <el-form-item label="源单单号">
            <div style="width: 200px;">{{ i.sourceorder }}</div>
          </el-form-item>
          <el-form-item label="工单数量" prop="mesqty">
            <div style="width: 200px;">{{ i.mesqty }}</div>
          </el-form-item>
          <el-form-item label="所属车间" prop="wkshopcode">
            <el-select
              v-model="i.wkshopcode"
              filterable
              :popper-append-to-body="false"
              style="width: 200px;"
              placeholder="请选择车间"
            >
              <!--              @change="val=>getMesOrderNewStepContentBatchUpdate(val,index)"-->
              <el-option
                v-for="item in wkshopArr"
                :key="item.torg_code"
                :label="item.torg_name"
                :value="item.torg_code"
              />
            </el-select>
          </el-form-item>
          <el-form-item
            label="产品名称"
            prop="partcode"
          >
            <div style="width: 200px;">{{ partArr.find(item => item.partcode === i.partcode).partname }}</div>
          </el-form-item>
          <el-form-item
            label="产品编码"
            prop="partcode"
          >
            <div style="width: 200px;">{{ i.partcode }}</div>
          </el-form-item>
          <el-form-item label="产品规格" prop="partspec">
            <div style="width: 200px;">{{
              partArr.find(item => item.partcode === i.partcode).partspec ? partArr.find(item => item.partcode === i.partcode).partspec : '/'
            }}
            </div>
          </el-form-item>
          <el-form-item v-if="mesSetting.route" label="工艺路线" prop="wkshopcode">
            <el-select
              v-model="i.routecode"
              filterable
              :popper-append-to-body="false"
              style="width: 200px;"
              placeholder="请选择工艺路线"
              @change="val=>routecodeChangeBatchUpdate(val,index)"
            >
              <el-option
                v-for="item in i.routecodeArr"
                :key="item.route_code"
                :label="item.route_name"
                :value="item.route_code"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="预计交付日期" prop="deliverydate">
            <el-date-picker
              v-model="i.deliverydate"
              type="date"
              size="mini"
              :clearable="false"
              class="dateMini"
              :picker-options="pickerOptions"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              placeholder="选择日期"
            />
          </el-form-item>
          <el-form-item label="工序来源" required>
            <el-switch
              v-model="i.sourceType"
              style="width: 200px;"
              inactive-text="基础设置"
              active-text="历史最新"
              :disabled="!i.wkshopcode"
              @change="val=>sourceTypeChangeBatchUpdate(val,index)"
            />
          </el-form-item>
          <el-divider content-position="left">工序信息 {{ index + 1 }}</el-divider>
          <div style="display: flex;align-items: center">
            <div style="font-weight: bolder">工序选择:</div>
            <el-select
              v-model="i.stepSelectedValue"
              class="stepSelectedValueClass"
              style="width: 930px;"
              multiple
              placeholder="请选择相对应工序"
              @change="val=>stepSelectedValueChangeBatchUpdate(val,index)"
            >
              <el-option
                v-for="item in stepSelectArr"
                :key="item.stepcode"
                :label="item.stepname"
                :value="item.stepcode"
              />
            </el-select>
          </div>
          <el-table
            :ref="'stepTableDataRef'+index"
            :key="index"
            :data="i.stepTableData"
            border
            :row-class-name="tableRowClassName"
            height="300"
            :header-cell-style="{
              background: '#f8f8fa', padding: '0', color: '#000', fontWeight: 500
            }"
            :cell-style="{padding: '5px 0'}"
            style="width: 100%;margin-top: 15px;"
            highlight-current-row
            row-key="stepcode"
          >
            <el-table-column
              type="index"
              label="序号"
              width="50"
            />
            <el-table-column
              prop="stepcode"
              show-tooltip-when-overflow
              label="工序编码"
            />
            <el-table-column
              prop="stepname"
              label="工序名称"
              show-tooltip-when-overflow
            />
            <el-table-column
              prop="stepprice"
              label="生产单价"
              show-tooltip-when-overflow
            >
              <template slot-scope="{row}">
                <el-input
                  v-model="row.stepprice"
                  placeholder="请输入工序单价"
                  oninput="value=value.replace(/[^0-9.]/g,'')"
                  style="width: 100%"
                />
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template slot-scope="scope">
                <div class="operationClass">
                  <!--                   <i-->
                  <!--                    class="el-icon-rank"-->
                  <!--                    :style="{color:$store.state.settings.theme}"-->
                  <!--                    style="cursor: move"-->
                  <!--                  />-->
                  <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                    <i
                      class="el-icon-delete"
                      :style="{color:$store.state.settings.theme}"
                      style="margin-left: 15px;"
                      @click="stepDelBatchUpdate(index,scope.$index)"
                    />
                  </el-tooltip>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </el-form>
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button v-waves @click="dialogVisibleCancelBatchUpdate">取 æ¶ˆ</el-button>
          <el-button
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
            :disabled="$store.state.app.buttonIsDisabled"
            @click="dialogVisibleConfirmBatchUpdate"
          >ç¡® å®š</el-button>
        </div>
      </span>
    </el-dialog>
  </div>
</template>
@@ -2269,9 +2621,9 @@
import waves from '@/directive/waves'
import {
  AddMesOrderCodeSearch,
  AddUpdateMesOrder, DeleteMesOrder,
  AddUpdateMesOrder, AddUpdateMesOrderList, DeleteMesOrder,
  MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent, MesOrderProcessSopSearch,
  MesOrderSearch, MesOrderSopSearch,
  MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch,
  UpdateMesOrderStepSearch
} from '@/api/WorkOrder'
import { PartSelect } from '@/api/ProductModel'
@@ -2280,7 +2632,7 @@
import ElDragSelect from '@/components/DragSelect'
import { MesOrderPrintSearch } from '@/api/GridReport' // base on element-ui
import DateType from '@/components/DateType'
import { PartSelectRpute, RouteSelectStep } from '@/api/basicSettings'
import { PartSelectRpute, PartSelectRputeList, RouteSelectStep, RouteSelectStepList } from '@/api/basicSettings'
import { DeviceSopSearch } from '@/api/DeviceManager'
export default {
@@ -2439,7 +2791,13 @@
        partspec: '',
        plan_qty: '',
        routename: '',
        lm_date: ''
        lm_date: '',
        priuserdefnvc1: '',
        priuserdefnvc2: '',
        priuserdefnvc3: '',
        priuserdefnvc4: '',
        priuserdefnvc5: '',
        priuserdefnvc6: ''
      },
      number: '',
      dialogVisible2: false,
@@ -2559,7 +2917,10 @@
      },
      sopArr: [],
      routeCode: '', // å·¥è‰ºè·¯çº¿code
      partCode: ''
      partCode: '',
      dialogVisibleBatchUpdate: false, // æ‰¹é‡ä¿®æ”¹
      formData3: []
    }
  },
  watch: {
@@ -2568,6 +2929,7 @@
      handler: function(val) {
        // do something with the new and old value of stepSelectedValue
        console.log(val, 1)
        console.log(this.stepTableData, 3)
        const arr = JSON.parse(JSON.stringify(this.stepTableData))
        const arrStepcode = arr.map(i => i.stepcode)
        this.stepTableData = []
@@ -2586,6 +2948,7 @@
  activated() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
    this.handleRequest()
  },
  created() {
    this.handleRequest()
@@ -2599,6 +2962,280 @@
    // })
  },
  methods: {
    stepDelBatchUpdate(index, ind) {
      this.formData3[index].stepTableData.splice(ind, 1)
      this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
    },
    // æ‰¹é‡ä¿®æ”¹
    async batchUpdate() {
      if (this.multipleSelection.length === 0) {
        return this.$message.info('请先勾选相对应的工单!')
      }
      const loading = this.$loading({
        lock: true,
        text: '正在加载数据,请稍等...',
        spinner: 'el-icon-loading',
        customClass: 'osloading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      const data2 = []
      const data3 = []
      this.formData3 = []
      const partcodeArr = []
      this.multipleSelection.forEach(i => {
        partcodeArr.push({
          partcode: i.partcode
        })
        if (this.mesSetting.route) {
          data2.push(
            { partcode: i.partcode, routecode: i.route_code ? i.route_code : i.default_route }
          )
        }
        data3.push({
          sourceid: i.sourceid,
          sourcewo: i.m_po,
          wocode: i.wo_code,
          data_sources: i.data_sources
        })
        this.formData3.push({
          mesorderstus: i.status, // å·¥å•状态码
          mesordercode: i.wo_code, // å·¥å•编号
          ordertype: i.wotype, // å·¥å•类型
          sourceorderid: i.sourceid, // æºå•id
          sourceorder: i.m_po, // æºå•单号
          partcode: i.partcode, // äº§å“ç¼–码
          partname: i.partname, // äº§å“åç§°
          partspec: i.partspec, // äº§å“è§„æ ¼
          mesqty: i.plan_qty, // å·¥å•数量
          wkshopcode: i.wkshp_code, // ç”Ÿäº§è½¦é—´ç¼–码
          wkshopname: i.wkshp_name, // ç”Ÿäº§è½¦é—´åç§°
          deliverydate: i.saleOrderDeliveryDate.substring(0, 11), // äº¤ä»˜æ—¶é—´
          data_sources: i.data_sources, // æ•°æ®æ¥æº
          sourceType: this.sourceType, // å·¥åºæ¥æº
          routecode: i.route_code ? i.route_code : i.default_route, // å·¥è‰ºè·¯çº¿
          routecodeArr: [], // å·¥è‰ºè·¯çº¿æ•°ç»„
          stepSelectedValue: [], // ä¸‹æ‹‰é€‰ä¸­å€¼
          stepTableData: []// å·¥åºè¡¨å€¼
        })
      })
      const { data: res3 } = await UpdateMesOrderStepListSearch(data3)
      console.log(res3, 321)
      res3.forEach((i, index) => {
        if (i.stepdata.length > 0) {
          this.formData3[index].stepTableData = i.stepdata
          this.formData3[index].stepSelectedValue = i.stepdata.map(j => j.stepcode)
        }
      })
      const { data: res } = await PartSelectRputeList(partcodeArr)
      if (this.mesSetting.route) {
        res.forEach((i, index) => {
          if (i.routedata.length > 0) {
            this.formData3[index].routecodeArr = i.routedata
          }
        })
      } else {
        this.formData3.forEach((i, index) => {
          if (i.stepTableData.length === 0) {
            i.stepTableData = res[index].stepdata
            i.stepSelectedValue = res[index].stepdata.length > 0 ? res[index].stepdata.map(j => j.stepcode) : []
          }
        })
      }
      if (this.mesSetting.route) {
        const { data: res2 } = await RouteSelectStepList(data2)
        this.formData3.forEach((i, index) => {
          if (i.stepTableData.length === 0) {
            i.stepTableData = res2[index].stepdata
            i.stepSelectedValue = res2[index].stepdata.length > 0 ? res2[index].stepdata.map(j => j.stepcode) : []
          }
        })
      }
      // this.formData3 = this.multipleSelection
      this.dialogVisibleBatchUpdate = true
      loading.close()
    },
    // å¯¹è¯æ¡†å…³é—­
    handleCloseBatchUpdate() {
      this.multipleSelection = []
      this.formData3 = []
      this.$refs.tableDataRef.clearSelection()
    },
    dialogVisibleCancelBatchUpdate() {
      this.dialogVisibleBatchUpdate = false
    },
    async dialogVisibleConfirmBatchUpdate() {
      this.$store.state.app.buttonIsDisabled = true
      let flag = false
      const data = []
      this.formData3.forEach((i, index) => {
        const workListSub = []
        if (i.stepTableData.length > 0) {
          i.stepTableData.forEach((it, j) => {
            workListSub.push(
              {
                stepseq: j + 1,
                stepcode: it.stepcode,
                stepprice: it.stepprice,
                isbott: j === 0 ? 'Y' : 'N',
                isend: j === i.stepTableData.length - 1 ? 'Y' : 'N'
              }
            )
          })
        } else {
          flag = true
        }
        data.push({
          wostatus: i.mesorderstus, // å·¥å•状态
          wocode: i.mesordercode, // å·¥å•号
          wotype: i.ordertype, // å·¥å•类型
          sourceid: i.sourceorderid, // æºå•id
          sourcewo: i.sourceorder, // æºå•单号
          partcode: i.partcode, // äº§å“ç¼–号
          wkshopcode: i.wkshopcode,
          woqty: i.mesqty, // å·¥å•数量
          deliverydate: i.deliverydate, // äº¤ä»˜æ—¶é—´
          data_sources: i.data_sources, // æ•°æ®æ¥æº
          isstep: workListSub.length > 0 ? 'Y' : 'N', //
          difference: 0, // æ•°æ®å·®å€¼
          routecode: i.routecode,
          workListSub
        })
      })
      if (flag) {
        this.$store.state.app.buttonIsDisabled = false
        return this.$message.error('数据未维护好,请先检查!')
      }
      const res = await AddUpdateMesOrderList(data)
      if (res.code === '200') {
        this.$message.success('修改操作成功!')
        this.$store.state.app.buttonIsDisabled = false
      }
      await this.getMesOrderSearch()
      this.dialogVisibleBatchUpdate = false
    },
    async sourceTypeChangeBatchUpdate(val, index) {
      if (val) {
        const data = {
          routecode: this.formData3[index].routecode,
          wkshopcode: this.formData3[index].wkshopcode,
          partcode: this.formData3[index].partcode
        }
        const { data: res } = await MesOrderNewStepContent(data)
        this.formData3[index].stepSelectedValue = []
        this.formData3[index].stepTableData = []
        if (res.length > 0) {
          res.forEach(i => {
            this.formData3[index].stepTableData.push(
              {
                stepcode: i.step_code,
                stepname: i.step_name,
                stepprice: i.stepprice
              }
            )
          })
          this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
        }
      } else {
        if (this.mesSetting.route) {
          // this.routecodeChange()
          const data = {
            partcode: this.formData3[index].partcode,
            routecode: this.formData3[index].routecode
          }
          const { data: res } = await RouteSelectStep(data)
          this.formData3[index].stepSelectedValue = []
          this.formData3[index].stepTableData = []
          if (res.length > 0) {
            res.sort((a, b) => a.step_seq - b.step_seq)
            res.forEach(i => {
              this.formData3[index].stepTableData.push(
                {
                  stepcode: i.step_code,
                  stepname: i.step_name,
                  stepprice: i.unprice
                }
              )
            })
            this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
          }
        } else {
          // this.getBasicProcessData()
          const { data: res } = await PartSelectRpute({ partcode: this.formData3[index].partcode })
          res.sort((a, b) => a.step_seq - b.step_seq)
          this.formData3[index].stepSelectedValue = []
          this.formData3[index].stepTableData = []
          res.forEach(i => {
            this.formData3[index].stepTableData.push(
              {
                stepcode: i.step_code,
                stepname: i.step_name,
                stepprice: i.unprice
              }
            )
          })
          this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
        }
      }
    },
    async getMesOrderNewStepContentBatchUpdate(val, index) {
      const data = {
        routecode: this.formData3[index].routecode,
        wkshopcode: this.formData3[index].wkshopcode,
        partcode: this.formData3[index].partcode
      }
      const { data: res } = await MesOrderNewStepContent(data)
      this.formData3[index].stepSelectedValue = []
      this.formData3[index].stepTableData = []
      if (res.length > 0) {
        res.forEach(i => {
          this.formData3[index].stepTableData.push(
            {
              stepcode: i.step_code,
              // stepname: i.stepname,
              stepprice: i.stepprice
            }
          )
        })
        this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
      }
    },
    async routecodeChangeBatchUpdate(val, index) {
      // this.sourceType
      const data = {
        partcode: this.formData3[index].partcode,
        routecode: this.formData3[index].routecode
      }
      const { data: res } = await RouteSelectStep(data)
      this.formData3[index].stepSelectedValue = []
      this.formData3[index].stepTableData = []
      if (res.length > 0) {
        res.sort((a, b) => a.step_seq - b.step_seq)
        res.forEach(i => {
          this.formData3[index].stepTableData.push(
            {
              stepcode: i.step_code,
              stepname: i.step_name,
              stepprice: i.unprice
            }
          )
        })
        this.formData3[index].stepSelectedValue = this.formData3[index].stepTableData.map(i => i.stepcode)
      }
    },
    // å¼¹å‡ºæ¡†å…³é—­
    handleSopClose() {
      this.SopDialogVisible = false
@@ -2817,11 +3454,12 @@
      this.dialogVisibleTask = false
    },
    handleSelectionChange(val) {
      this.multipleSelection = val.map(i => i.wo_code)
      this.multipleSelection = val
    },
    selected(row, index) {
      return row.status === 'NEW' && row.isstep === 'Y'
      return row.status === 'NEW'
      // return row.status === 'NEW' && row.isstep === 'Y'
    },
    // æ´¾å‘
    send() {
@@ -2834,7 +3472,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        MesOrderDistribution(this.multipleSelection).then(res => {
        MesOrderDistribution(this.multipleSelection.map(i => i.wo_code)).then(res => {
          if (res.code === '200') {
            this.$notify.success('派发成功!')
            this.getMesOrderSearch()
@@ -2873,7 +3511,14 @@
        this.$notify.info('已取消删除')
      })
    },
    // è¶…报比例
    rationChange(val, row) {
      row.sumqty = Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(val) > 0 ? parseFloat(val) / 100 : 0)))
    },
    // æ‰¹é‡ä¿®æ”¹çš„  è¶…æŠ¥æ¯”ä¾‹
    rationBatchChange(val, row, index) {
      row.sumqty = Math.round(parseFloat(this.formData3[index].mesqty) * (1 + (parseFloat(val) > 0 ? parseFloat(val) / 100 : 0)))
    },
    // ä¿®æ”¹æŒ‰é’®
    async edit(operation, row) {
      this.operation = operation
@@ -2902,13 +3547,17 @@
      }
      const { data: res } = await UpdateMesOrderStepSearch(data)
      this.dialogForm.mesmaxqty = res.canupdate_qty
      if (this.mesSetting.route) { // æŒ‰å·¥è‰ºè·¯çº¿èµ°æ¨¡å¼
        if (!this.dialogForm.routecode) {
          await this.getPartcodeChangeDialog()
        } else {
          const { data: res } = await PartSelectRpute({ partcode: this.dialogForm.partcode })
          this.routecodeArr = res
        }
        if (res.stepdata.length > 0) {
          this.stepTableData = []
          this.stepSelectedValue = []
          res.stepdata.forEach(i => {
            this.stepTableData.push(
              {
@@ -2941,6 +3590,7 @@
      } else {
        if (res.stepdata.length > 0) {
          res.stepdata.forEach(i => {
            console.log(i)
            this.stepTableData.push(
              {
                stepcode: i.step_code,
@@ -3128,7 +3778,6 @@
          if (workListSub.length === 0) {
            return this.$message.info('工序不能为空!')
          }
          const data = {
            wostatus: this.dialogForm.mesorderstus, // å·¥å•状态
            wocode: this.dialogForm.mesordercode, // å·¥å•号
@@ -3208,10 +3857,18 @@
      this.dialogVisibleSearch = false
    },
    // å¤„理打印
    handlePrint(wo_code, saleOrderCode) {
    handlePrint(wo_code, saleOrderCode, row) {
      // const number = Math.random() * Math.random()
      // this.number = number === 0 ? (10 + Math.random()) : number
      // console.log(number)
      this.formApprove.priuserdefnvc1 = row.priuserdefnvc1 ? row.priuserdefnvc1 : '/'
      this.formApprove.priuserdefnvc2 = row.priuserdefnvc2 ? row.priuserdefnvc2 : '/'
      this.formApprove.priuserdefnvc3 = row.priuserdefnvc3 ? row.priuserdefnvc3 : '/'
      this.formApprove.priuserdefnvc4 = row.priuserdefnvc4 ? row.priuserdefnvc4 : '/'
      this.formApprove.priuserdefnvc5 = row.priuserdefnvc5 ? row.priuserdefnvc5 : '/'
      this.formApprove.priuserdefnvc6 = row.priuserdefnvc6 ? row.priuserdefnvc6 : '/'
      this.formApprove.saleOrderCode = this.formApprove.saleOrderCode !== '' ? this.formApprove.saleOrderCode : saleOrderCode
      const data2 = {
        mesordercode: wo_code || this.dialogForm.mesordercode
@@ -3323,6 +3980,12 @@
      this.formApprove.routename = ''
      this.formApprove.lm_date = ''
      this.formApprove.priuserdefnvc1 = ''
      this.formApprove.priuserdefnvc2 = ''
      this.formApprove.priuserdefnvc3 = ''
      this.formApprove.priuserdefnvc4 = ''
      this.formApprove.priuserdefnvc5 = ''
      this.formApprove.priuserdefnvc6 = ''
      // this.$refs.qrCodeDiv0.title = ''
      this.tableDataPrint = []
@@ -3682,6 +4345,18 @@
    stepSelectedValueChange(val) {
      // console.log(val, 123)
    },
    stepSelectedValueChangeBatchUpdate(val, index) {
      console.log(val, index)
      this.formData3[index].stepTableData = []
      val.forEach(i => {
        this.formData3[index].stepTableData.push({
          stepcode: i,
          stepname: this.stepSelectArr.find(j => j.stepcode === i).stepname,
          stepprice: 0
        })
      })
    },
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
@@ -4027,9 +4702,25 @@
    height: 100% !important;
  }
}
.customDiv {
  ::v-deep .el-divider:first-child {
    width: 120%;
    margin-left: -10%;
  }
}
</style>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
<style>
.sortable-ghost {
  opacity: .8;
  color: #fff !important;
  background: #42b983 !important;
}
</style>
src/views/workOrder/workOrderList_back.vue
ÎļþÌ«´ó