Procházet zdrojové kódy

禅道bug 2635修改

jingshuyong před 10 měsíci
rodič
revize
eb9b6f57be

+ 32 - 32
src/views/materialPlan/components/producePlan.vue

@@ -744,31 +744,31 @@
             label: '库存',
             showOverflowTooltip: true
           },
-          {
-            prop: 'secureInventory',
-            label: '安全库存',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'lockQuantity',
-            label: '锁库数量',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'inTransitNum',
-            label: '在途数量',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'inTransitOrdersNum',
-            label: '在途已关联数量',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'availableQuantity',
-            label: '可用数量',
-            showOverflowTooltip: true
-          },
+          // {
+          //   prop: 'secureInventory',
+          //   label: '安全库存',
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'lockQuantity',
+          //   label: '锁库数量',
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'inTransitNum',
+          //   label: '在途数量',
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'inTransitOrdersNum',
+          //   label: '在途已关联数量',
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'availableQuantity',
+          //   label: '可用数量',
+          //   showOverflowTooltip: true
+          // },
           {
             prop: 'unit',
             label: '计量单位',
@@ -785,13 +785,13 @@
             minWidth: 120
           },
 
-          {
-            label: '采购数量',
-            slot: 'purchaseQuantity',
-            action: 'purchaseQuantity',
-            align: 'center',
-            minWidth: 120
-          },
+          // {
+          //   label: '采购数量',
+          //   slot: 'purchaseQuantity',
+          //   action: 'purchaseQuantity',
+          //   align: 'center',
+          //   minWidth: 120
+          // },
 
           {
             label: '到货方式',

+ 37 - 136
src/views/productionPlan/components/purchaseDialog.vue

@@ -346,105 +346,6 @@
       };
     },
     computed: {
-      // columns() {
-      //   return [
-      //     {
-      //       width: 45,
-      //       type: 'expand',
-      //       columnKey: 'materialList',
-      //       align: 'center'
-      //     },
-      //     {
-      //       width: 50,
-      //       label: '序号',
-      //       type: 'index',
-      //       align: 'center',
-      //       slot: 'index'
-      //     },
-      //     {
-      //       prop: 'producePlanCode',
-      //       label: '计划编号',
-      //       showOverflowTooltip: true,
-      //       align: 'center',
-      //       minWidth: 170,
-      //       sortable: true
-      //     },
-      //     {
-      //       prop: 'code',
-      //       label: '销售订单号',
-      //       slot: 'code',
-      //       showOverflowTooltip: true,
-      //       align: 'center',
-      //       minWidth: 170,
-      //       sortable: true
-      //     },
-      //     {
-      //       prop: 'customerName',
-      //       label: '客户名称',
-      //       align: 'center',
-      //       showOverflowTooltip: true
-      //     },
-      //     {
-      //       prop: 'deliveryNum',
-      //       label: '客户代号',
-      //       align: 'center',
-      //       showOverflowTooltip: true
-      //     },
-      //     {
-      //       prop: 'productCode',
-      //       label: '编码',
-      //       align: 'center',
-      //       showOverflowTooltip: true,
-      //       minWidth: 140
-      //     },
-
-      //     {
-      //       prop: 'productName',
-      //       label: '名称',
-      //       align: 'center',
-      //       minWidth: 120
-      //     },
-
-      //     {
-      //       prop: 'model',
-      //       label: '型号',
-      //       align: 'center',
-      //       minWidth: 120
-      //     },
-
-      //     {
-      //       prop: 'brandNo',
-      //       label: '牌号',
-      //       align: 'center'
-      //     },
-
-      //     {
-      //       prop: 'deliveryTime',
-      //       label: '交付日期',
-      //       align: 'center',
-      //       showOverflowTooltip: true
-      //     },
-      //     {
-      //       prop: 'contractNum',
-      //       label: '订单数量',
-      //       align: 'center'
-      //     },
-      //     {
-      //       prop: 'lackNum',
-      //       label: '欠交数量',
-      //       align: 'center'
-      //     },
-      //     {
-      //       columnKey: 'action',
-      //       label: '操作',
-      //       width: 150,
-      //       align: 'center',
-      //       resizable: false,
-      //       slot: 'action',
-      //       showOverflowTooltip: true
-      //     }
-      //   ];
-      // },
       columns2() {
         return [
           {
@@ -497,36 +398,36 @@
             showOverflowTooltip: true,
             align: 'center'
           },
-          {
-            prop: 'secureInventory',
-            label: '安全库存',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            prop: 'lockQuantity',
-            label: '锁库数量',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            prop: 'inTransitNum',
-            label: '在途数量',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            prop: 'inTransitOrdersNum',
-            label: '在途已关联数量',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
-          {
-            prop: 'availableQuantity',
-            label: '可用数量',
-            showOverflowTooltip: true,
-            align: 'center'
-          },
+          // {
+          //   prop: 'secureInventory',
+          //   label: '安全库存',
+          //   showOverflowTooltip: true,
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'lockQuantity',
+          //   label: '锁库数量',
+          //   showOverflowTooltip: true,
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'inTransitNum',
+          //   label: '在途数量',
+          //   showOverflowTooltip: true,
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'inTransitOrdersNum',
+          //   label: '在途已关联数量',
+          //   showOverflowTooltip: true,
+          //   align: 'center'
+          // },
+          // {
+          //   prop: 'availableQuantity',
+          //   label: '可用数量',
+          //   showOverflowTooltip: true,
+          //   align: 'center'
+          // },
           {
             prop: 'unit',
             label: '计量单位',
@@ -544,13 +445,13 @@
             minWidth: 120
           },
 
-          {
-            label: '采购数量',
-            slot: 'purchaseQuantity',
-            action: 'purchaseQuantity',
-            align: 'center',
-            minWidth: 120
-          },
+          // {
+          //   label: '采购数量',
+          //   slot: 'purchaseQuantity',
+          //   action: 'purchaseQuantity',
+          //   align: 'center',
+          //   minWidth: 120
+          // },
 
           {
             label: '到货方式',

+ 1 - 0
src/views/productionPlan/index.vue

@@ -832,6 +832,7 @@
     },
     mounted() {
       this.getPlanStatistics();
+
     },
     methods: {
       handleSele(e) {

+ 3 - 22
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -704,6 +704,7 @@
         this.startTime = time;
       },
       open(dataList, order, source, produceType) {
+        this.clearData();
         this.produceType = produceType;
         this.initTime();
         this.source = source;
@@ -844,31 +845,11 @@
           this.formInline.bomId = id;
           this.bomVChange(id);
         }
-        // this.formInline.bomType = e;
-        // this.bomCode = '';
-        // let data = this.bomListType.find((el) => el.id === e);
-        // if (!data) return;
-        // this.bomListV = data.bomList.map((el) => {
-        //   return {
-        //     ...el,
-        //     name: data.name
-        //   };
-        // });
-        // let idx = 0;
-        // if (type == 'init') {
-        //   idx = data.bomList.findIndex(
-        //     (item) => item.bomId == this.orderInfo.bomCategoryId
-        //   );
-        // }
-        // const index = idx != -1 ? idx : 0;
-        // await this.bomVChange(data.bomList[index].bomId);
       },
       // 选择BOM版本
       async bomVChange(e) {
-        // this.formInline.bomId = e;
-        // let data = this.bomListV.find((el) => el.bomId === e);
-        // if (!data) return;
-        // this.bomCode = data.code;
+        this.datasourceList = [];
+        this.datasourceAllList = [];
         await this.getMaterialData({ bomId: e }, this.formInline.attributeType);
       },
 

+ 612 - 0
src/views/workOrder/components/details.vue

@@ -0,0 +1,612 @@
+<template>
+  <ele-modal
+    :width="modelWidth"
+    :visible.sync="detailsVisible"
+    :close-on-click-modal="false"
+    custom-class="ele-dialog-form"
+    :maxable="true"
+    :title="'详情'"
+    append-to-body
+    :before-close="cancel"
+  >
+    <div class="form-wrapper">
+      <el-form
+        ref="form"
+        :model="form"
+        :inline="true"
+        label-position="right"
+        label-width="100px"
+      >
+        <el-row :gutter="10" class="basic" type="flex" style="flex-wrap: wrap">
+          <el-col
+            :xs="12"
+            :sm="12"
+            :md="12"
+            :lg="8"
+            :xl="6"
+            v-for="item in fieldList"
+            :key="item.prop"
+          >
+            <el-form-item :label="item.label">
+              <!-- <div class="item_label">{{ current[item.prop] }}</div> -->
+              <el-input :value="fieldValue(item.prop)" disabled />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="10">
+          <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
+            <el-form-item label="所属工厂:">
+              <el-input v-model="form.factoryName" :disabled="true"> </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
+            <el-form-item label="所属工作中心:">
+              <el-select
+                style="width: 100%"
+                v-model="form.workCenterId"
+                placeholder="请选择"
+                @change="changeWork"
+              >
+                <el-option
+                  v-for="item in workCenterList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
+            <el-form-item label="所属班组:" required>
+              <el-select
+                style="width: 100%"
+                v-model="form.teamId"
+                placeholder="请选择"
+                @change="changeGroups"
+              >
+                <el-option
+                  v-for="item in teamList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-form-item label="报工类型:" required>
+            <el-radio-group v-model="form.singleReport">
+              <!-- v-if="clientEnvironmentId != 2" -->
+              <el-radio :label="1" :disabled="singleDis">单件报工</el-radio>
+              <el-radio :label="0" :disabled="batchDis">批量报工</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item label="派单方式:" prop="taskAss">
+            <!-- @change="changeDispatch" -->
+            <el-radio-group v-model="form.taskAss">
+              <el-radio :label="1" :disabled="orderDis">生产订单派单</el-radio>
+              <el-radio :label="0" :disabled="procTaskDis"
+                >工序任务派单</el-radio
+              >
+            </el-radio-group>
+          </el-form-item>
+        </el-row>
+        <el-row v-if="form.taskAss == 1">
+          <el-col :span="24">
+            <el-form-item label="指派:" prop="assignType">
+              <el-radio-group
+                v-model="form.assignType"
+                size="mini"
+                @change="assignRadio"
+              >
+                <el-radio-button :label="1">工位</el-radio-button>
+                <el-radio-button :label="2">人员</el-radio-button>
+                <el-radio-button :label="3">产线</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-form-item required label="工位:" v-if="form.assignType == 1">
+            <el-select
+              class="ele-block"
+              v-model="form.workstationIds"
+              placeholder="请选择工位"
+              size="mini"
+              multiple
+              filterable
+            >
+              <el-option
+                v-for="item in stationList"
+                :key="item.id"
+                :label="item.name + '(' + item.code + ')'"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="人员:" v-if="form.assignType == 2">
+            <el-select
+              class="ele-block"
+              v-model="form.crewIds"
+              placeholder="请选择人员"
+              size="mini"
+              filterable
+              multiple
+            >
+              <el-option
+                v-for="item in crewList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="产线:" v-if="form.assignType == 3" required>
+            <el-select
+              class="ele-block"
+              v-model="form.factoryLineIds"
+              placeholder="请选择产线"
+              size="mini"
+              filterable
+              multiple
+            >
+              <el-option
+                v-for="item in productionList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-row>
+
+        <el-tabs
+          class="process_list"
+          v-model="processId"
+          type="border-card"
+          @tab-click="handleClick"
+          v-show="form.taskAss == 0"
+          v-loading="tabsLoading"
+        >
+          <el-tab-pane
+            v-for="(item, index) in processList"
+            :key="item.id"
+            :label="item.name"
+            :name="item.id"
+          >
+            <ele-pro-table
+              class="table"
+              :ref="`tableRef${index}`"
+              :columns="columns"
+              :datasource="item.list"
+              cache-key="systemRoleTable"
+              :pageSize="20"
+              v-loading="tabLoading"
+              :selection.sync="item.selection"
+              row-key="id"
+            >
+              <template v-slot:toolbar>
+                <el-button
+                  type="primary"
+                  @click="dispatch(item, 1)"
+                  :loading="toolbarLoading"
+                >
+                  派单
+                </el-button>
+                <el-button
+                  type="primary"
+                  @click="dispatch(item, 2)"
+                  :loading="toolbarLoading"
+                >
+                  撤回
+                </el-button>
+                <el-button
+                  type="primary"
+                  @click="dispatch(item, 3)"
+                  :loading="toolbarLoading"
+                >
+                  保存
+                </el-button>
+
+                <div style="margin-left: 50px; display: inline-block">
+                  <span
+                    class="text"
+                    style="
+                      font-weight: bold;
+                      font-size: 14px;
+                      margin-right: 8px;
+                    "
+                    >指派:</span
+                  >
+                  <el-radio-group
+                    v-model="item.assignType"
+                    size="mini"
+                    @change="(e) => changeRadio(e, index)"
+                  >
+                    <el-radio-button
+                      :label="1"
+                      :disabled="radioBun(item, 'stationDis')"
+                      >工位</el-radio-button
+                    >
+                    <el-radio-button
+                      :label="2"
+                      :disabled="radioBun(item, 'staffDis')"
+                      >人员</el-radio-button
+                    >
+                    <el-radio-button
+                      :label="3"
+                      :disabled="radioBun(item, 'lineDis')"
+                      >产线</el-radio-button
+                    >
+                  </el-radio-group>
+                </div>
+
+                <div
+                  style="margin-left: 50px; display: inline-block"
+                  v-if="timeSlot(item)"
+                >
+                  时间段: {{ item.startDate }} ----- {{ item.endDate }}
+                </div>
+              </template>
+              <template v-slot:quantity="{ row }">
+                <el-input
+                  :disabled="permissions(row)"
+                  type="number"
+                  v-model="row.quantity"
+                  placeholder="请输入数量"
+                  @input="(e) => handleQuantityInput(e, row, item)"
+                ></el-input>
+              </template>
+              <template v-slot:weight="{ row }">
+                <el-input
+                  :disabled="permissions(row)"
+                  type="number"
+                  v-model="row.weight"
+                  placeholder="请输入重量"
+                  @input="(e) => handleWeightInput(e, row, item)"
+                ></el-input>
+              </template>
+              <template v-slot:teamTimeIds="{ row }">
+                <el-select
+                  :disabled="permissions(row)"
+                  multiple
+                  v-model="row.teamTimeIds"
+                  placeholder="班次"
+                  @change="(e) => shiftSelection(e, row, item)"
+                >
+                  <el-option
+                    v-for="item in shiftList"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </template>
+              <template v-slot:startTime="{ row }">
+                <el-date-picker
+                  :disabled="permissions(row)"
+                  class="w100"
+                  v-model="row.startTime"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="开始时间"
+                  @change="handleStartTimeChange(row, item)"
+                ></el-date-picker>
+              </template>
+              <template v-slot:endTime="{ row }">
+                <el-date-picker
+                  :disabled="permissions(row)"
+                  class="w100"
+                  v-model="row.endTime"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  @change="handleEndTimeChange(row, item)"
+                  placeholder="完成时间"
+                ></el-date-picker>
+              </template>
+
+              <template v-slot:action="{ row }">
+                <!--  :disabled="resetBtnDis(row)" -->
+                <el-popconfirm
+                  title="确定要重置该条数据吗?"
+                  @confirm="resetData(row, item)"
+                  v-if="resetBtnDis(row)"
+                >
+                  <template v-slot:reference>
+                    <el-link type="primary" :underline="false"> 重置 </el-link>
+                  </template>
+                </el-popconfirm>
+              </template>
+            </ele-pro-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-form>
+    </div>
+
+    <div slot="footer">
+      <el-button plain @click="cancel">取消</el-button>
+      <el-button type="primary" @click="confirm" :loading="toolbarLoading"
+        >确定</el-button
+      >
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import releaseMixin from '../mixins/release';
+  import { parameterGetByCode } from '@/api/mainData/index';
+  export default {
+    components: {},
+    props: {
+      current: {
+        type: Object,
+        default: () => {}
+      },
+      detailsVisible: {
+        type: Boolean,
+        default: false
+      }
+    },
+    mixins: [releaseMixin],
+    data() {
+      return {
+        processId: '',
+        tabLoading: false,
+        dynamicName: '工位名称',
+        form: {
+          assignType: 1,
+          crewIds: '',
+          workstationIds: '',
+          teamId: '',
+          singleReport: '',
+          workCenterId: '',
+          taskAss: 1,
+          factoryName: '',
+          factoryLineIds: ''
+        },
+        toolbarLoading: false,
+        processList: [],
+        workCenterList: [],
+        teamList: [],
+        tabsLoading: false,
+        stationList: [], // 工位的数据
+        productionList: [], // 产线的数据
+        crewList: [], // 人员的数据
+        procTaskDis: false, // 工序任务派单选择
+        firstTaskindex: '', // 首工序id 对应的工序列表数据下标
+        fieldList: [
+          { label: '生产订单号:', prop: 'code' },
+          { label: '计划编号:', prop: 'productionPlanCode' },
+          { label: '工艺路线:', prop: 'produceRoutingName' },
+          // { label: '编码', prop: 'productCode' },
+          { label: '名称:', prop: 'productName' },
+          { label: '生产编号:', prop: 'productionCodes' },
+          { label: '牌号:', prop: 'brandNo' },
+          { label: '批次号:', prop: 'batchNo' },
+          { label: '型号:', prop: 'model' },
+          { label: '要求生产数量:', prop: 'formingNum' },
+          { label: '要求生产重量:', prop: 'initialWeight' },
+          { label: '计划开始时间:', prop: 'planStartTime' },
+          { label: '计划结束时间:', prop: 'planCompleteTime' }
+        ],
+        shiftList: [],
+        dateValue: '',
+        orderDis: false, // 生产订单派单
+        singleDis: false, // 单个报工
+        batchDis: false, // 批量报工
+        isDispatchRow: {}, // 查询是否派单数据
+        time_calc_code: '0' // 是否进行时间赋值 0 否 1 是
+      };
+    },
+    computed: {
+      fieldValue() {
+        return (field) => {
+          return this.current[field];
+        };
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      },
+      userInfo() {
+        return this.$store.state.user.info;
+      },
+      modelWidth() {
+        // if(this.form.taskAss == 1){
+        //   return '1000px'
+        // }
+        return '75vw';
+      },
+      // 重置按钮 的置灰权限 没有进行操作跟派单的数据 置灰
+      resetBtnDis() {
+        return (row) => {
+          if (!row.status) return false;
+          let flag = row.status.code != 1;
+          return flag;
+        };
+      },
+      // 指派单选框操作 已派单的 其它两个按钮不能操作
+      radioBun() {
+        return (row, type) => {
+          if (!row.radioBun) return false;
+          let flag = row.radioBun[type];
+          return flag;
+        };
+      },
+      // 列表输入框操作 已派单的不能操作
+      permissions() {
+        return (row) => {
+          if (!row.status) return false;
+          if (row.status.code == 1) return true;
+        };
+      },
+      // 时间段显示
+      timeSlot() {
+        return (item) => {
+          if (!item.startDate || !item.endDate) {
+            return false;
+          }
+          return true;
+        };
+      },
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left',
+            reserveSelection: true
+          },
+          {
+            prop: 'name',
+            label: this.dynamicName,
+            align: 'center',
+            width: 200
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            width: 200
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            width: 150,
+            formatter: (row) => {
+              if (!row.status) return '';
+              return row.status.desc || '';
+            }
+          },
+          {
+            slot: 'quantity',
+            prop: 'quantity',
+            label: '数量',
+            align: 'center',
+            width: 140
+          },
+          {
+            slot: 'weight',
+            prop: 'weight',
+            label: `重量(${this.current.newWeightUnit})`,
+            align: 'center',
+            width: 140
+          },
+          {
+            slot: 'teamTimeIds',
+            prop: 'teamTimeIds',
+            label: '班次',
+            align: 'center',
+            minWidth: 220
+          },
+          {
+            slot: 'startTime',
+            prop: 'startTime',
+            label: '计划开始时间',
+            align: 'center',
+            minWidth: 240
+          },
+          {
+            slot: 'endTime',
+            prop: 'endTime',
+            label: '计划完成时间',
+            align: 'center',
+            minWidth: 240
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 120,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action'
+          }
+        ];
+      }
+    },
+    watch: {},
+    created() {
+      // 时间计算规则code
+      this.getCode();
+      this.workCenterData(); // 查询工作中心
+      this.getClassesData(); // 查询班次
+      this.queryCheckExists(); // 查询是否派单
+      this.form.singleReport = this.clientEnvironmentId == 2 ? 0 : '';
+      this.dateValue = this.getFormattedDate();
+    },
+    methods: {
+      getCode() {
+        parameterGetByCode({
+          code: 'time_calculation_rules'
+        }).then((res) => {
+          if (res) {
+            this.time_calc_code = res.value || '0';
+          }
+        });
+      },
+
+      async getDispatchMethod(code) {
+        await parameterGetByCode({ code }).then((res) => {
+          if (res) {
+            this.form.taskAss = res.value == '0' ? 0 : 1;
+          }
+        });
+      },
+
+      async getAssignmentMethod(code) {
+        await parameterGetByCode({ code }).then((res) => {
+          if (res) {
+            this.form.assignType =
+              res.value == '0' ? 0 : res.value == '1' ? 1 : 2;
+          }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .top-box {
+    display: flex;
+    margin-bottom: 10px;
+    .item-box {
+      flex: 1;
+    }
+  }
+
+  .radio-box {
+    margin: 10px 0;
+  }
+
+  .table {
+    margin-top: 20px;
+  }
+
+  ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
+    background-color: #10d070;
+    border-color: #10d070;
+  }
+  ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
+    box-shadow: none;
+  }
+</style>

+ 28 - 99
src/views/workOrder/index.vue

@@ -59,7 +59,12 @@
           ></el-checkbox>
         </template>
         <template v-slot:code="{ row }">
-          <el-link type="primary" :underline="false" style="padding-left: 16px">
+          <el-link
+            type="primary"
+            :underline="false"
+            style="padding-left: 16px"
+            @click="openDetails(row)"
+          >
             <el-tag type="success" size="mini" v-if="row.originalCode">
               拆</el-tag
             >
@@ -136,102 +141,6 @@
         </template>
       </ele-pro-table>
     </el-card>
-    <!--    <el-dialog :visible.sync="visible" title="派单" width="500px">-->
-    <!--      <el-form-->
-    <!--        ref="form"-->
-    <!--        :model="form"-->
-    <!--        :rules="rules"-->
-    <!--        label-position="left"-->
-    <!--        label-width="100px"-->
-    <!--      >-->
-    <!--        <el-form-item label="报工类型:" prop="singleReport">-->
-    <!--          <el-radio-group v-model="form.singleReport">-->
-    <!--            <el-radio v-if="clientEnvironmentId != 2" :label="1"-->
-    <!--            >单件报工-->
-    <!--            </el-radio>-->
-    <!--            <el-radio :label="0">批量报工</el-radio>-->
-    <!--          </el-radio-group>-->
-    <!--        </el-form-item>-->
-
-    <!--        <el-form-item label="指定:" prop="assignType">-->
-    <!--          <el-radio-group-->
-    <!--            v-model="form.assignType"-->
-    <!--            size="mini"-->
-    <!--            @change="assignTypeFn"-->
-    <!--          >-->
-    <!--            <el-radio-button :label="1">工位</el-radio-button>-->
-    <!--            <el-radio-button :label="2">人员</el-radio-button>-->
-    <!--          </el-radio-group>-->
-    <!--        </el-form-item>-->
-
-    <!--        <el-form-item label="班组:" prop="teamId">-->
-    <!--          <el-select-->
-    <!--            v-model="form.teamId"-->
-    <!--            class="ele-block"-->
-    <!--            filterable-->
-    <!--            placeholder="请选择班组"-->
-    <!--            size="mini"-->
-    <!--            @change="stationChange"-->
-    <!--          >-->
-    <!--            <el-option-->
-    <!--              v-for="item in teamsList"-->
-    <!--              :key="item.id"-->
-    <!--              :label="item.name + '(' + item.code + ')'"-->
-    <!--              :value="item.id"-->
-    <!--            >-->
-    <!--            </el-option>-->
-    <!--          </el-select>-->
-    <!--        </el-form-item>-->
-
-    <!--        <el-form-item-->
-    <!--          v-if="form.assignType == 1"-->
-    <!--          label="工位:"-->
-    <!--          prop="workstationIds"-->
-    <!--        >-->
-    <!--          <el-select-->
-    <!--            v-model="form.workstationIds"-->
-    <!--            class="ele-block"-->
-    <!--            filterable-->
-    <!--            multiple-->
-    <!--            placeholder="请选择工位"-->
-    <!--            size="mini"-->
-    <!--          >-->
-    <!--            <el-option-->
-    <!--              v-for="item in stationList"-->
-    <!--              :key="item.id"-->
-    <!--              :label="item.name + '(' + item.code + ')'"-->
-    <!--              :value="item.id"-->
-    <!--            >-->
-    <!--            </el-option>-->
-    <!--          </el-select>-->
-    <!--        </el-form-item>-->
-
-    <!--        <el-form-item v-if="form.assignType == 2" label="人员:" prop="crewIds">-->
-    <!--          <el-select-->
-    <!--            v-model="form.crewIds"-->
-    <!--            class="ele-block"-->
-    <!--            filterable-->
-    <!--            multiple-->
-    <!--            placeholder="请选择人员"-->
-    <!--            size="mini"-->
-    <!--          >-->
-    <!--            <el-option-->
-    <!--              v-for="item in crewList"-->
-    <!--              :key="item.id"-->
-    <!--              :label="item.name"-->
-    <!--              :value="item.id"-->
-    <!--            >-->
-    <!--            </el-option>-->
-    <!--          </el-select>-->
-    <!--        </el-form-item>-->
-    <!--      </el-form>-->
-
-    <!--      <div slot="footer" class="footer">-->
-    <!--        <el-button @click="close">取消</el-button>-->
-    <!--        <el-button v-click-once type="primary" @click="confirm">确定</el-button>-->
-    <!--      </div>-->
-    <!--    </el-dialog>-->
-
     <unpackDialog ref="unpackRef" @success="createSuccess" />
     <releaseDialog
       v-if="dispatchVisible"
@@ -241,6 +150,12 @@
       @createSuccess="createSuccess"
     />
     <BatchDialog ref="batchRef" @createSuccess="createSuccess" />
+    <Details
+      ref="detailsRef"
+      v-if="detailsVisible"
+      :current="dispatchRow"
+      :detailsVisible="detailsVisible"
+    />
   </div>
 </template>
 
@@ -264,6 +179,7 @@
   import PlanStatistics from '@/components/statistics/PlanStatistics.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
   import BatchDialog from '@/views/workOrder/components/batchDialog.vue';
+  import Details from './components/details.vue';
   export default {
     mixins: [tabMixins],
     components: {
@@ -271,7 +187,8 @@
       OrderSearch,
       unpackDialog,
       releaseDialog,
-      BatchDialog
+      BatchDialog,
+      Details
     },
     data() {
       return {
@@ -322,7 +239,8 @@
         columnsVersion: 1,
         dispatchRow: {},
         dispatchVisible: false,
-        selectionMap: {}
+        selectionMap: {},
+        detailsVisible: false
       };
     },
     computed: {
@@ -639,6 +557,17 @@
       this.getFieldModel();
     },
     methods: {
+      // 进入详情
+      openDetails(row) {
+        
+        // let dispatchRow = { ...row };
+        // this.dispatchRow = { ...row };
+        // dispatchRow.initialWeight = row.formingWeight
+        //   ? row.formingWeight + row.newWeightUnit
+        //   : '';
+        // this.dispatchRow = dispatchRow;
+        // this.detailsVisible = true;
+      },
       // 全选/取消全选
       selectAll(selection) {
         if (selection.length == 0) {