zouyu
2023-11-17 7b10179a35a079a098126a1cb3aea2e8d010704d
	modified:   src/const/crud/customerOrder/customerOrderForm.js
modified: src/views/common/document.vue
modified: src/views/common/ztt-table.vue
modified: src/views/plan/customerorder/sample-customerorder-form.vue
modified: src/views/plan/manfacturingorderstatement/index.vue
modified: src/views/plan/manufacturingorder/index.vue
modified: src/views/plan/masterproductionschedule/auto-manufacturingorder.vue
modified: src/views/plan/masterproductionschedule/index.vue
modified: src/views/plan/operationtask/index.vue
modified: src/views/plan/outsourcingorder/index.vue
modified: src/views/plan/outsourcingorder/outsourcingorder-form.vue
modified: src/views/warehouse/stock/index.vue
已修改12个文件
287 ■■■■ 文件已修改
src/const/crud/customerOrder/customerOrderForm.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/document.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/ztt-table.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/sample-customerorder-form.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manfacturingorderstatement/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/manufacturingorder/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/masterproductionschedule/auto-manufacturingorder.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/masterproductionschedule/index.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/operationtask/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/outsourcingorder/index.vue 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/outsourcingorder/outsourcingorder-form.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/stock/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/const/crud/customerOrder/customerOrderForm.js
@@ -25,6 +25,7 @@
  delBtn: false,
  align: 'center',
  addBtn: false,
  addBtnText: '添加行',
  addRowBtn: true,
  cancelBtn: false,
  refreshBtn: false, // 是否显示刷新按钮
src/views/common/document.vue
@@ -13,33 +13,33 @@
      <el-row>
        <el-col :span="3"><span>印字方式:</span></el-col>
        <el-col :span="3"
          ><span>{{ relationOrderList[0].printType }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].printType : "" }}</span></el-col
        >
        <el-col :span="3"><span>印字要求:</span></el-col>
        <el-col :span="3"
          ><span>{{ relationOrderList[0].printingRequirements }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].printingRequirements : "" }}</span></el-col
        >
        <el-col :span="3"><span>盘长要求:</span></el-col>
        <el-col :span="3"
          ><span>{{ relationOrderList[0].lengthRequirement }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].lengthRequirement : "" }}</span></el-col
        >
        <el-col :span="3"><span>包装要求:</span></el-col>
        <el-col :span="3"
          ><span>{{ relationOrderList[0].packageRequire }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].packageRequire : "" }}</span></el-col
        >
      </el-row>
      <el-row>
        <el-col :span="3"><span>质量要求:</span></el-col>
        <el-col :span="3"
          ><span>{{ relationOrderList[0].qualityRequire }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].qualityRequire : "" }}</span></el-col
        >
        <el-col :span="3"><span>生产需求说明:</span></el-col>
        <el-col :span="3"
          ><span>{{ relationOrderList[0].otherProductRequire }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].otherProductRequire : "" }}</span></el-col
        >
        <el-col :span="3"><span>备注:</span></el-col>
        <el-col :span="9"
          ><span>{{ relationOrderList[0].remark }}</span></el-col
          ><span>{{ relationOrderList[0] ? relationOrderList[0].remark : "" }}</span></el-col
        >
      </el-row>
    </div>
src/views/common/ztt-table.vue
@@ -143,7 +143,7 @@
          height
            ? fixHeight
              ? fixHeight
              : undefined
              : '100px'
            : $store.getters.tableHeight - otherHeight
        "
        v-bind="$attrs"
@@ -168,7 +168,6 @@
        :span-method="objectSpanMethod"
        :header-cell-style="tableHeaderStyle"
        v-adaptive="{ bottomOffset: bottomOffset, fixedHeight: fixedHeight }"
        height="100px"
        :class="[
          'commonTable',
          isGeneralSearch && !isEdit
@@ -226,7 +225,7 @@
          :sortable="!isEdit ? (item.sort ? 'custom' : item.sort) : false"
          v-bind="$attrs"
          v-on="$listeners"
          v-if="item.isTrue"
          v-show="item.isTrue"
          :class-name="
            (orderBy == null && item.prop == options.defaultOrderBy.column) ||
            (orderBy != null &&
@@ -250,7 +249,7 @@
            :width="inMemoryColWidth[item.prop] || item.width"
            :prop="item.prop"
          >
            <template slot="header" slot-scope="scope">
            <template slot="header">
              <template v-if="item.isSearch">
                <div class="th" @click.stop>
                  <template
@@ -507,7 +506,9 @@
              <i class="el-icon-upload"></i>
              <div class="el-upload__text"><em>点击导入数据</em></div>
              <div class="el-upload__tip" slot="tip">
                只能上传xlsx/xls文件,且不超过30M<el-button
                <span v-if="uploadInfo.tipText" v-text="uploadInfo.tipText"></span>
                <span v-else>只能上传xlsx/xls文件,且不超过30M。</span>
                <el-button
                  type="text"
                  style="font-size:15px;text-decoration: underline;"
                  @click="downDataTemplate"
src/views/plan/customerorder/sample-customerorder-form.vue
@@ -401,7 +401,6 @@
  watch:{
    visible(newVal){
      if(!newVal){
        this.tableData = [{
            "$cellEdit": true,
            "$index": 0,
@@ -609,4 +608,9 @@
  color: #c0c4cc;
  margin: -1px 0;
}
.avue-crud .avue-crud__left .el-button{
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 0px;
}
</style>
src/views/plan/manfacturingorderstatement/index.vue
@@ -26,7 +26,7 @@
              </el-input>
            </div>
          </el-col>
          <el-col :span="1" offset="1">
          <el-col :span="1" :offset="1">
            <div>
              <el-divider direction="vertical"></el-divider>
              <div
@@ -49,7 +49,7 @@
              </el-input>
            </div>
          </el-col>
          <el-col :span="1" offset="1">
          <el-col :span="1" :offset="1">
            <div>
              <el-divider direction="vertical"></el-divider>
              <div
@@ -72,7 +72,7 @@
              </el-input>
            </div>
          </el-col>
          <el-col :span="1" offset="1">
          <el-col :span="1" :offset="1">
            <div>
              <el-divider direction="vertical"></el-divider>
              <div
@@ -98,7 +98,7 @@
              </el-date-picker>
            </div>
          </el-col>
          <el-col :span="2" offset="1">
          <el-col :span="2" :offset="1">
            <el-button type="primary" @click="getDataList()">搜索</el-button>
          </el-col>
        </el-row>
src/views/plan/manufacturingorder/index.vue
@@ -22,9 +22,9 @@
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item
                :key="item"
                :key="index"
                :command="item.command"
                v-for="item in taskTypeArr"
                v-for="(item,index) in taskTypeArr"
                :disabled="canCreateTask"
                >{{ item.label }}</el-dropdown-item
              >
@@ -41,20 +41,20 @@
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item
                :key="item"
                :key="index"
                :command="item.command"
                v-for="item in stateTagArr"
                v-for="(item,index) in stateTagArr"
                :disabled="item.disabled"
                >{{ item.label }}</el-dropdown-item
              >
            </el-dropdown-menu>
          </el-dropdown>
          <el-dropdown
          <!-- <el-dropdown
            v-if="permissions.manufacturingorder_issue_material"
            @command="issueMaterialHandleCommand"
            style="margin-left:10px;"
          >
          > -->
            <!-- <el-button>
              发料<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button> -->
@@ -66,7 +66,7 @@
                >{{ item.label }}</el-dropdown-item
              >
            </el-dropdown-menu> -->
          </el-dropdown>
          <!-- </el-dropdown> -->
          <!-- <el-button
            v-if="permissions.manufacturingorder_orderto_ifs"
            @click="commitOrderIfs()"
src/views/plan/masterproductionschedule/auto-manufacturingorder.vue
@@ -155,7 +155,7 @@
                </el-select>
              </template>
            </el-table-column>
            <el-table-column
            <!-- <el-table-column
              prop="isReportOperation"
              label="IFS车间订单接收时报告工序"
              align="center"
@@ -163,7 +163,7 @@
              <template slot-scope="scope">
                <span>{{ scope.row.isReportOperation ? '是' : '否' }}</span>
              </template>
            </el-table-column>
            </el-table-column> -->
          </el-table>
        </div>
      </div>
src/views/plan/masterproductionschedule/index.vue
@@ -9,7 +9,7 @@
              车间订单<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item :key="item" :command="item.command" v-for="item in orderTypeArr" :disabled="item.disabled">{{
              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in orderTypeArr" :disabled="item.disabled">{{
                item.label }}</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
@@ -20,7 +20,7 @@
              状态改变<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item :key="item" :command="item.command" v-for="item in stateTagArr" :disabled="item.disabled">{{
              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in stateTagArr" :disabled="item.disabled">{{
                item.label }}</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
@@ -31,7 +31,7 @@
              工艺文件<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item :key="item" :command="item.command" v-for="item in documentTagArr" :disabled="item.disabled">
              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in documentTagArr" :disabled="item.disabled">
                {{ item.label }}
              </el-dropdown-item>
            </el-dropdown-menu>
@@ -43,7 +43,7 @@
              审核状态改变<i class="el-icon-arrow-down el-icon--right"></i>
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item :key="item" :command="item.command" v-for="item in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item>
              <el-dropdown-item :key="index" :command="item.command" v-for="(item,index) in commitStateTagArr" :disabled="item.disabled">{{item.label }}</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <el-button v-if="permissions.masterproductionschedule_submit_oa" @click="commitOa()" type="primary"
@@ -486,33 +486,33 @@
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'outerColor',
            label: '外护颜色',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'lengthRequirement',
            label: '盘长要求',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'printRequirement',
            label: '印字要求',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '140',
          //   prop: 'outerColor',
          //   label: '外护颜色',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '140',
          //   prop: 'lengthRequirement',
          //   label: '盘长要求',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '140',
          //   prop: 'printRequirement',
          //   label: '印字要求',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          {
            minWidth: '140',
            prop: 'orderRemark',
src/views/plan/operationtask/index.vue
@@ -21,9 +21,9 @@
            </el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item
                :key="item"
                :key="index"
                :command="item.command"
                v-for="item in stateTagArr"
                v-for="(item,index) in stateTagArr"
                :disabled="item.disabled"
                >{{ item.label }}</el-dropdown-item
              >
src/views/plan/outsourcingorder/index.vue
@@ -18,13 +18,9 @@
                  状态变更<i class="el-icon-arrow-down el-icon--right"></i>
                </el-button>
                <el-dropdown-menu slot="dropdown">
                  <template v-for="item in stateTagArr">
                    <el-dropdown-item
                      :command="item.command"
                      :disabled="item.disabled">
                      {{ item.eventName }}
                    </el-dropdown-item>
                  </template>
                  <el-dropdown-item v-for="(item, index) in stateTagArr" :key="index" :command="item.command" :disabled="item.disabled">
                    {{ item.eventName }}
                  </el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
              <el-dropdown @command="handleCommandOa" style="margin-left: 10px">
@@ -32,8 +28,8 @@
                  审核变更<i class="el-icon-arrow-down el-icon--right"></i>
                </el-button>
                <el-dropdown-menu slot="dropdown">
                  <template v-for="item in oaStateTagArr">
                    <el-dropdown-item :key="item" :command="item.command" v-if="item.isShow"
                  <template v-for="(item, index) in oaStateTagArr">
                    <el-dropdown-item :key="index" :command="item.command" v-if="item.isShow"
                      >{{ item.eventName }}
                    </el-dropdown-item>
                  </template>
@@ -70,6 +66,16 @@
        @refreshOutsourcingOrder="refreshOutsourcingOrder"
      ></outsourcing-order-stock-form>
    </basic-container>
    <el-dialog
      title="提示"
      :visible.sync="showForeignDialog"
      width="30%">
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="showForeignDialog = false">取 消</el-button>
        <el-button type="primary" @click="showForeignDialog = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -90,10 +96,12 @@
import TableForm from './outsourcingorder-form'
import OutsourcingOrderStockForm from './outsourcingorderstock-form'
import { value2label, dateTime2date } from '@/util/formatUtil'
import { log } from '@chenfengyuan/vue-qrcode'
export default {
  data() {
    return {
      showForeignDialog: false,
      ajaxFun: fetchListOutsourcingOrder,
      addOrUpdateVisible: false,
      addOrUpdateJoinVisible: false,
@@ -250,6 +258,19 @@
          },
          {
            minWidth: '140',
            prop: 'foreignState',
            label: '对外直发状态',
            sort: true,
            isTrue: true,
            formatter: this.formatForeignState,
            isSearch: true,
            searchInfoType: 'select',
            optList: () => {
              return this.foreignStateList
            }
          },
          {
            minWidth: '140',
            prop: 'state',
            label: '状态',
            sort: true,
@@ -335,16 +356,54 @@
            type: 'primary',
            loading: false,
            fun: this.launchOaProcess
          },
          {
            text: '新增外协直发申请单',
            type: 'primary',
            loading: false,
            fun: this.showForeign
          },
        ],
        operator:[
          {
            text: '打印发料单',
            type: 'text',
            size: 'small',
            show: {
              val: [
                '03pass'
              ],
              key: 'oaState'
            }
          },
          {
            text: '打印模具外协生产单',
            type: 'text',
            size: 'small',
            show: {
              val: [
                '03pass'
              ],
              key: 'oaState'
            }
          }
        ],
        operatorConfig: {
          fixed: 'right',
          label: '操作',
          width: 100,
          minWidth: 100
          width: 230,
          minWidth: 230
        }
      },
      foreignStateList: [
          {
            label: '是',
            value: 0
          },{
            label: '否',
            value: 1
          }
      ],
      paramObj: { outsourcingOrderId: 0 },
      joinAjaxFun: fetchList,
      joinMultipleSelection: [],
@@ -449,8 +508,8 @@
        operatorConfig: {
          fixed: 'right',
          label: '操作',
          width: 60,
          minWidth: 60
          width: 100,
          minWidth: 100
        }
      }
    }
@@ -464,6 +523,24 @@
    ...mapGetters(['permissions'])
  },
  methods: {
    //展示新增外协直发模态框
    showForeign(){
      let data = this.currentOutsourcingOrder
      if(data){
        if(data.foreignState == "1"){
          this.$message.warning("该订单无需外协直发申请单")
          return
        }
        if(data.foreignState == "0" && data.foreignId!= null){
          this.$message.warning("该订单已有外协直发申请单")
          return
        }
        //
        this.$message.success("新增")
      }else{
        this.$message.warning("请选择一条委外订单")
      }
    },
    // 获取数据列表
    getData() {
      this.$refs.outsourcingOrderTable.refreshData()
@@ -472,12 +549,19 @@
    addOrUpdateHandle(row) {
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row == null ? null : row.id)
        this.$refs.addOrUpdate.init(row == null ? null : row.id,null,row == null ? null : row.mpsId)
      })
    },
    // 发起OA审核流程
    launchOaProcess() {
      if (this.currentOutsourcingOrder) {
        let foreignState = this.currentOutsourcingOrder.foreignState
        let foreignId = this.currentOutsourcingOrder.foreignId
        console.log(this.currentOutsourcingOrder);
        if(foreignState == 0 && foreignId==null){
          this.$message.warning("请先新增外协直发申请单")
          return
        }
        this.table.toolbar[1].loading = true
        approvalOaByOutsourcingOrderId(this.currentOutsourcingOrder.id)
          .then((data) => {
@@ -500,6 +584,15 @@
    // 状态格式化
    formatState(row, column, cellValue) {
      return value2label(cellValue, this.stateTagArr)
    },
    //外协直发状态格式化
    formatForeignState(row,column,cellValue){
      this.foreignStateList.forEach(obj=>{
        if(obj.value==cellValue){
          cellValue =  obj.label
        }
      })
      return cellValue
    },
    // OA状态格式化
    formatOaState(row, column, cellValue) {
@@ -586,6 +679,10 @@
    // 库存接收
    addOrUpdateStockHandle(row) {
      if (this.currentOutsourcingOrder) {
        if(this.currentOutsourcingOrder.foreignState == "0"){
          this.$message.error('外协直发不接收库存')
          return
        }
        this.addOrUpdateJoinVisible = true
        this.$nextTick(() => {
          this.$refs.addOrUpdateJoin.init(
src/views/plan/outsourcingorder/outsourcingorder-form.vue
@@ -9,7 +9,7 @@
      :rules="dataRule"
      :disabled="editable"
      ref="dataForm"
      label-width="100px"
      label-width="110px"
      class="l-mes"
    >
      <el-row :gutter="10">
@@ -37,6 +37,7 @@
        <el-col :span="12">
          <el-form-item label="需求数量" prop="qtyRequired">
            <el-input
              style="width:100%"
              v-model="dataForm.qtyRequired"
              @change="checkNumber()"
            ></el-input>
@@ -61,6 +62,18 @@
            <el-input v-model="dataForm.remark"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="是否外协直发" prop="foreignState">
            <el-switch
            v-model="dataForm.foreignState"
            active-text="是"
            inactive-text="否"
            active-value="0"
            inactive-value="1"
            active-color="#13ce66">
            </el-switch>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <span slot="footer" class="dialog-footer">
@@ -82,7 +95,8 @@
  addOutsourcingOrder,
  putOutsourcingOrder
} from '@/api/plan/outsourcingorder'
import { validateSixDecimalNotNull } from '@/util/validate'
import { getObj } from '@/api/plan/masterproductionschedule'
import { validatePositiveInteger } from '@/util/validate'
import partDialog from '@/views/common/part.vue'
export default {
@@ -102,13 +116,14 @@
        qtyRequired: '',
        requiredDate: '',
        remark: '',
        mpsId: null
        mpsId: null,
        foreignState: null,
      },
      dataRule: {
        partId: [{ required: true, message: '零件不能为空', trigger: 'blur' }],
        qtyRequired: [
          { required: true, message: '需求数量不能为空', trigger: 'blur' },
          { validator: validateSixDecimalNotNull, trigger: 'blur' }
          { validator: validatePositiveInteger, trigger: 'blur' },
        ],
        requiredDate: [
          { required: true, message: '需求日期不能为空', trigger: 'blur' }
@@ -119,7 +134,7 @@
  },
  created() {},
  methods: {
    init(id, masterProductionSchedule) {
    init(id, masterProductionSchedule,mpsId) {
      this.dataForm.id = id || 0
      this.visible = true
      this.$nextTick(() => {
@@ -129,13 +144,14 @@
            this.dataForm = response.data.data
          })
        }
        // 从主生产计划过来的,带上零件
        if (masterProductionSchedule) {
          this.dataForm.qtyRequired = masterProductionSchedule.qtyRequired
          this.dataForm.partNo = masterProductionSchedule.partNo
          this.dataForm.partName = masterProductionSchedule.partName
          this.dataForm.partId = masterProductionSchedule.partId
          this.dataForm.mpsId = masterProductionSchedule.id
          this.dataForm.qtyRequired = masterProductionSchedule.qtyRequired
          this.dataForm.requiredDate = masterProductionSchedule.requiredDate
        }
      })
@@ -179,7 +195,8 @@
      }
    },
    // 检验需求数量
    checkNumber() {},
    checkNumber() {
    },
    // 检验需求日期
    checkDate() {}
  },
src/views/warehouse/stock/index.vue
@@ -8,6 +8,7 @@
        :prelang="prelang"
        :options="options"
        :ajaxFun="ajaxFun"
        :paramObj="paramObj"
        ref="warehouseStockTable"
      >
        <template #toolbar>
@@ -60,6 +61,7 @@
export default {
  data() {
    return {
      paramObj: {},
      stockVisible: false,
      ajaxFun: realTimeStockPage,
      multipleSelection: [],
@@ -392,6 +394,9 @@
    ...mapGetters(['permissions'])
  },
  activated() {
    this.paramObj = {
      partNo: this.$route.query.partNo
    }
    this.getData()
  },
  methods: {