cuijian
2025-07-01 0211b730e5f0b1f10a8a3243e30fe599e22f2238
质量-检验工具,检验项目
已添加6个文件
已修改11个文件
2074 ■■■■■ 文件已修改
src/components/jeecgbiz/JSelectFactory.vue 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/jeecgbiz/modal/JSelectFactoryModal.vue 310 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/FactoryManager.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/ShiftGroupManager.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/ShiftManager.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/SupplierList.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/WarehouseList.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/modules/group/GroupModal.vue 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/modules/shift/ShiftModel.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/modules/supplier/SupplierModel.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/base/modules/warehouse/WarehouseModel.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/modules/message/SysMessageTemplateList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qms/InspectionItemList.vue 332 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qms/InspectionToolsList.vue 317 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qms/modules/inspectionItem/InspectionItemModel.vue 274 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qms/modules/inspectionTools/InspectionToolsModel.vue 228 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/UserModal.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/jeecgbiz/JSelectFactory.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,180 @@
<template>
  <div class="components-input-demo-presuffix">
    <!---->
    <a-input @click="openModal" placeholder="请点击选择车间" v-model="textVals" readOnly :disabled="disabled">
      <a-icon slot="prefix" type="cluster" title="车间选择控件"/>
      <a-icon v-if="storeVals" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
    </a-input>
    <j-select-factory-modal
      ref="factorySelectModal"
      :modal-width="modalWidth"
      :multi="multi"
      :rootOpened="rootOpened"
      :factory-id="value"
      :store="storeField"
      :text="textField"
      :treeFactoryOpera="treeFactoryOpera"
      @ok="handleOK"
      @initComp="initComp">
    </j-select-factory-modal>
  </div>
</template>
<script>
  import JSelectFactoryModal from './modal/JSelectFactoryModal'
  import { underLinetoHump } from '@/components/_util/StringUtil'
  export default {
    name: 'JSelectFactory',
    components:{
      JSelectFactoryModal
    },
    props:{
      modalWidth:{
        type:Number,
        default:500,
        required:false
      },
      multi:{
        type:Boolean,
        default:false,
        required:false
      },
      rootOpened:{
        type:Boolean,
        default:true,
        required:false
      },
      value:{
        type:String,
        required:false
      },
      disabled:{
        type: Boolean,
        required: false,
        default: false
      },
      // è‡ªå®šä¹‰è¿”回字段,默认返回 id
      customReturnField: {
        type: String,
        default: ''
      },
      backProduction: {
        type: Boolean,
        default: false,
        required: false
      },
      // å­˜å‚¨å­—段 [key field]
      store: {
        type: String,
        default: 'id',
        required: false
      },
      // æ˜¾ç¤ºå­—段 [label field]
      text: {
        type: String,
        default: 'factoryName',
        required: false
      },
      treeFactoryOpera: {
        type: Boolean,
        default: false,
        required: false
      }
    },
    data(){
      return {
        visible:false,
        confirmLoading:false,
        storeVals: '', //[key values]
        textVals: '' //[label values]
      }
    },
    computed:{
      storeField(){
        let field = this.customReturnField
        if(!field){
          field = this.store;
        }
        return underLinetoHump(field)
      },
      textField(){
        return underLinetoHump(this.text)
      }
    },
    mounted(){
      this.storeVals = this.value
    },
    watch:{
      value(val){
        this.storeVals = val
      }
    },
    methods:{
      initComp(textVals){
        this.textVals = textVals
      },
      //返回选中的车间信息
      backProductInfo(){
        if(this.backProduction===true){
          if(this.storeVals && this.storeVals.length>0){
            let arr1 = this.storeVals.split(',')
            let arr2 = this.textVals.split(',')
            let info = []
            for(let i=0;i<arr1.length;i++){
              info.push({
                value: arr1[i],
                text: arr2[i]
              })
            }
            this.$emit('back', info)
          }
        }
      },
      openModal(){
        this.$refs.factorySelectModal.show()
      },
      handleOK(rows) {
        if (!rows && rows.length <= 0) {
          this.textVals = ''
          this.storeVals = ''
        } else {
          let arr1 = []
          let arr2 = []
          for(let dep of rows){
            arr1.push(dep[this.storeField])
            arr2.push(dep[this.textField])
          }
          this.storeVals = arr1.join(',')
          this.textVals = arr2.join(',')
        }
        this.$emit("change", this.storeVals)
        this.backProductInfo()
      },
      handleEmpty(){
        this.handleOK('')
      }
    },
    model: {
      prop: 'value',
      event: 'change'
    }
  }
</script>
<style scoped>
  .components-input-demo-presuffix .anticon-close-circle {
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
    font-size: 12px;
  }
  .components-input-demo-presuffix .anticon-close-circle:hover {
    color: #f5222d;
  }
  .components-input-demo-presuffix .anticon-close-circle:active {
    color: #666;
  }
</style>
src/components/jeecgbiz/modal/JSelectFactoryModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,310 @@
<template>
  <j-modal
    title="选择车间"
    :width="modalWidth"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel"
    @update:fullscreen="isFullscreen"
    wrapClassName="j-production-select-modal"
    switchFullscreen
    cancelText="关闭">
    <a-spin tip="Loading..." :spinning="false">
      <a-input-search style="margin-bottom: 1px" placeholder="请输入车间名称按回车进行搜索" @search="onSearch" />
      <a-tree
        checkable
        :class="treeScreenClass"
        :treeData="treeData"
        :checkStrictly="checkStrictly"
        @check="onCheck"
        @select="onSelect"
        @expand="onExpand"
        :autoExpandParent="autoExpandParent"
        :expandedKeys="expandedKeys"
        :checkedKeys="checkedKeys">
        <template slot="title" slot-scope="{title}">
          <span v-if="title.indexOf(searchValue) > -1">
            {{title.substr(0, title.indexOf(searchValue))}}
            <span style="color: #f50">{{searchValue}}</span>
            {{title.substr(title.indexOf(searchValue) + searchValue.length)}}
          </span>
          <span v-else>{{title}}</span>
        </template>
      </a-tree>
    </a-spin>
    <!--底部父子关联操作和确认取消按钮-->
    <!--<template slot="footer">-->
      <!--<div class="drawer-bootom-button">-->
        <!--<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">-->
          <!--<a-menu slot="overlay">-->
            <!--<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>-->
            <!--<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>-->
          <!--</a-menu>-->
          <!--<a-button>-->
            <!--树操作 <a-icon type="up" />-->
          <!--</a-button>-->
        <!--</a-dropdown>-->
        <!--<a-button @click="handleCancel" type="primary" style="margin-right: 0.8rem">关闭</a-button>-->
        <!--<a-button @click="handleSubmit" type="primary" >确认</a-button>-->
      <!--</div>-->
    <!--</template>-->
  </j-modal>
</template>
<script>
  import { queryFactoryTreeList } from '@/api/api'
  export default {
    name: 'JSelectFactoryModal',
    props:['modalWidth','multi','rootOpened','factoryId', 'store', 'text','treeOpera'],
    data(){
      return {
        visible:false,
        confirmLoading:false,
        treeData:[],
        autoExpandParent:true,
        expandedKeys:[],
        dataList:[],
        checkedKeys:[],
        checkedRows:[],
        searchValue:"",
        checkStrictly: false,
        fullscreen:false
      }
    },
    created(){
      this.loadFactory();
    },
    watch:{
      factoryId(){
        this.initFactoryComponent()
      },
      visible: {
        handler() {
          this.initFactoryComponent(true)
        }
      }
    },
    computed:{
      treeScreenClass() {
        return {
          'my-factory-select-tree': true,
          'fullscreen': this.fullscreen,
        }
      },
    },
    methods:{
      show(){
        this.visible=true
        this.checkedRows=[]
        this.checkedKeys=[]
      },
      loadFactory(){
        // è¿™ä¸ªæ–¹æ³•是找到所有的车间信息
        queryFactoryTreeList().then(res=>{
          if(res.success){
            let arr = [...res.result]
            this.reWriterWithSlot(arr)
            this.treeData = arr
            this.initFactoryComponent()
            if(this.rootOpened){
              this.initExpandedKeys(res.result)
            }
          }
        })
      },
      initFactoryComponent(flag){
        let arr = []
        //该方法两个地方用 1.visible改变事件重新设置选中项 2.组件编辑页面回显
        let fieldName = flag==true?'key':this.text
        if(this.factoryId){
          let arr2 = this.factoryId.split(',')
          for(let item of this.dataList){
            if(arr2.indexOf(item[this.store])>=0){
              arr.push(item[fieldName])
            }
          }
        }
        if(flag==true){
          this.checkedKeys = [...arr]
        }else{
          this.$emit("initComp", arr.join(','))
        }
      },
      reWriterWithSlot(arr){
        for(let item of arr){
          if(item.children && item.children.length>0){
            this.reWriterWithSlot(item.children)
            let temp = Object.assign({},item)
            temp.children = {}
            this.dataList.push(temp)
          }else{
            this.dataList.push(item)
            item.scopedSlots={ title: 'title' }
          }
        }
      },
      initExpandedKeys(arr){
        if(arr && arr.length>0){
          let keys = []
          for(let item of arr){
            if(item.children && item.children.length>0){
              keys.push(item.id)
            }
          }
          this.expandedKeys=[...keys]
          //全部keys
          //this.allTreeKeys = [...keys]
        }else{
          this.expandedKeys=[]
          //this.allTreeKeys = []
        }
      },
      onCheck (checkedKeys,info) {
        if(!this.multi){
          let arr = checkedKeys.checked.filter(item => this.checkedKeys.indexOf(item) < 0)
          this.checkedKeys = [...arr]
          this.checkedRows = (this.checkedKeys.length === 0) ? [] : [info.node.dataRef]
        }else{
          if(this.checkStrictly){
            this.checkedKeys = checkedKeys.checked
          }else{
            this.checkedKeys = checkedKeys
          }
          this.checkedRows = this.getCheckedRows(this.checkedKeys)
        }
      },
      onSelect(selectedKeys,info) {
        //取消关联的情况下才走onSelect的逻辑
        if(this.checkStrictly){
          let keys = []
          keys.push(selectedKeys[0])
          if(!this.checkedKeys || this.checkedKeys.length===0 || !this.multi){
            this.checkedKeys = [...keys]
            this.checkedRows=[info.node.dataRef]
          }else{
            let currKey = info.node.dataRef.key
            if(this.checkedKeys.indexOf(currKey)>=0){
              this.checkedKeys = this.checkedKeys.filter(item=> item !==currKey)
            }else{
              this.checkedKeys.push(...keys)
            }
          }
          this.checkedRows = this.getCheckedRows(this.checkedKeys)
        }
      },
      onExpand (expandedKeys) {
        this.expandedKeys = expandedKeys
        this.autoExpandParent = false
      },
      handleSubmit(){
        if(!this.checkedKeys || this.checkedKeys.length==0){
          this.$emit("ok",'')
        }else{
          let checkRow = this.getCheckedRows(this.checkedKeys)
          let keyStr = this.checkedKeys.join(",")
          this.$emit("ok", checkRow, keyStr)
        }
        this.handleClear()
      },
      handleCancel(){
        this.handleClear()
      },
      handleClear(){
        this.visible=false
        this.checkedKeys=[]
      },
      getParentKey(currKey,treeData){
        let parentKey
        for (let i = 0; i < treeData.length; i++) {
          const node = treeData[i]
          if (node.children) {
            if (node.children.some(item => item.key === currKey)) {
              parentKey = node.key
            } else if (this.getParentKey(currKey, node.children)) {
              parentKey = this.getParentKey(currKey, node.children)
            }
          }
        }
        return parentKey
      },
      onSearch(value){
        const expandedKeys = this.dataList.map((item) => {
          if (item.title.indexOf(value) > -1) {
            return this.getParentKey(item.key,this.treeData)
          }
          return null
        }).filter((item, i, self) => item && self.indexOf(item) === i)
        Object.assign(this, {
          expandedKeys,
          searchValue: value,
          autoExpandParent: true,
        })
      },
      // æ ¹æ® checkedKeys èŽ·å– rows
      getCheckedRows(checkedKeys) {
        const forChildren = (list, key) => {
          for (let item of list) {
            if (item.id === key) {
              return item
            }
            if (item.children instanceof Array) {
              let value = forChildren(item.children, key)
              if (value != null) {
                return value
              }
            }
          }
          return null
        }
        let rows = []
        for (let key of checkedKeys) {
          let row = forChildren(this.treeData, key)
          if (row != null) {
            rows.push(row)
          }
        }
        return rows
      },
      switchCheckStrictly (v) {
        if(v==1){
          this.checkStrictly = false
        }else if(v==2){
          this.checkStrictly = true
        }
      },
      isFullscreen(val){
        this.fullscreen=val
      }
    }
  }
</script>
<style lang="less" scoped>
  // é™åˆ¶éƒ¨é—¨é€‰æ‹©æ ‘高度,避免部门太多时点击确定不便
  .my-factory-select-tree{
    height:350px;
    &.fullscreen{
      height: calc(100vh - 250px);
    }
    overflow-y: scroll;
  }
  .drawer-bootom-button {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #e8e8e8;
    padding: 10px 16px;
    text-align: right;
    left: 0;
    background: #fff;
    border-radius: 0 0 2px 2px;
  }
</style>
src/views/base/FactoryManager.vue
@@ -119,11 +119,11 @@
  </a-row>
</template>
<script>
  import UserFactory from './modules/FactoryManager/UserFactory'
  import UserFactory from './modules/factoryManager/UserFactory'
  import { queryFactoryTreeList, searchByKeywords, deleteByFactory } from '@/api/api'
  import { httpAction, deleteAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import FactoryModal from './modules/FactoryManager/FactoryModal'
  import FactoryModal from './modules/factoryManager/FactoryModal'
  export default {
    name: 'FactoryManager',
src/views/base/ShiftGroupManager.vue
@@ -15,7 +15,7 @@
              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-col :md="12" :sm="24">
               <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </a-col>
          </span>
            </a-row>
@@ -221,6 +221,21 @@
              title: '班组名称',
              align: 'center',
              dataIndex: 'groupName'
            },
            {
              title: '班组长',
              align: 'center',
              dataIndex: 'groupManager_dictText'
            },
            {
              title: '班次',
              align: 'center',
              dataIndex: 'shiftId_dictText'
            },
            {
              title: '产线',
              align: 'center',
              dataIndex: 'factoryId_dictText'
            },
            {
              title: '创建时间',
@@ -456,6 +471,7 @@
          this.$message.error('请选择一个班组!')
        } else {
          this.$refs.selectUserModal.visible = true
          this.$refs.selectUserModal.selectedRowKeys = []
        }
      },
      handleOpen(record) {
src/views/base/ShiftManager.vue
@@ -36,7 +36,7 @@
           slot="shiftStatus"
           slot-scope="text, record"
         >
           <span v-if="text == 0" style="color:red;">停用</span>
           <span v-if="text == 0" style="color:red;">禁用</span>
           <span v-if="text == 1" style="color:green;">启用</span>
         </span>
        <span
@@ -46,16 +46,52 @@
           <span v-if="text == '1'">是</span>
           <span v-if="text == '0'">否</span>
         </span>
        <span
         <span
          slot="action"
          slot-scope="text, record"
        >
        <a  v-if="record.shiftStatus == 1" @click="handleEdit(record)">编辑</a>
            <a-divider type="vertical" v-if="record.shiftStatus == 1"/>
            <a v-if="record.shiftStatus == 0" @click="handleStatus(record.id,1)">启用</a>
            <a v-if="record.shiftStatus == 1" @click="handleStatus(record.id,0)">停用</a>
            <a-divider type="vertical" />
            <a @click="handleDelete(record.id)">删除</a>
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >详情</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多
              <a-icon type="down" />
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a v-if="record.shiftStatus == 1" @click="handleEdit(record)">编辑</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.shiftStatus == 0">
                <a-popconfirm
                  title="确定启用吗?"
                  @confirm="() => handleStatus(record.id,1)"
                >
                  <a>启用</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.shiftStatus == 1">
                <a-popconfirm
                  title="确定禁用吗?"
                  @confirm="() => handleStatus(record.id,0)"
                >
                  <a>禁用</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
src/views/base/SupplierList.vue
@@ -1,7 +1,6 @@
<template>
  <a-card
    :bordered="false"
    title="供应商"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
@@ -11,10 +10,7 @@
      >
        <a-row :gutter="30">
          <a-col
            :md="6"
            :sm="24"
          >
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="供应商编号">
              <j-input
                placeholder="请输入供应商编号检索"
@@ -23,16 +19,20 @@
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="24"
          >
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="供应商名称">
              <j-input
                placeholder="请输入供应商名称检索"
                v-model="queryParam.supplierName"
              ></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
@@ -41,20 +41,14 @@
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        type="primary"
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
      >新增</a-button>
      <!-- <a-button type="primary" @click="exportToExcel('供应商信息导入模板')" icon="export" style="margin-left: 8px" >下载导入模板</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">导入</a-button>
      </a-upload> -->
    </div>
    <!-- table区域-begin -->
@@ -70,17 +64,7 @@
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}"
        @change="handleTableChange"
        :customRow="clickThenCheck"
      >
        <span
          slot="partCount"
          slot-scope="text,record"
          class="fontweight"
        >
          {{record.partCount}}
        </span>
        <!--状态栏个性展示-->
        <span
          slot="status"
@@ -181,9 +165,7 @@
  },
  data() {
    return {
      selectedRowRecord: {},
      dataSource: [],
      partCount: "",
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
@@ -265,7 +247,6 @@
          scopedSlots: { customRender: 'action' },
        }
      ],
      type: "radio",
      url: {
        list: '/base/supplier/list',
        delete: '/base/supplier/delete',
@@ -274,9 +255,7 @@
    }
  },
  mounted() {
    this.$bus.$on('refreshParentPage', (data) => {
      this.loadData();
    })
  },
  methods: {
    loadData(arg) {
@@ -319,18 +298,30 @@
        }
      });
    },
    clickThenCheck(record) {
      return {
        on: {
          click: (e) => {
            this.selectedRowRecord = record;
            this.onSelectChange(record.id.split(","), [record]);
          }
    exportToExcel(fileName) {
      this.loading = true // æ˜¾ç¤ºåŠ è½½é®ç½©
      this.queryParam.paraTypeFlag = this.paraTypeFlag
      var params = this.getQueryParams()
      downFile(this.url.loadTemplate,params).then((data)=>{
        if (!data) {
          this.$message.warning("文件下载失败")
          return
        }
      };
    },
    onSelectChange(selectedRowKeys) {
      this.selectedRowKeys = selectedRowKeys;
        if (typeof window.navigator.msSaveBlob !== 'undefined') {
          window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}), fileName+'.xlsx')
        }else{
          let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}))
          let link = document.createElement('a')
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', fileName+'.xlsx')
          document.body.appendChild(link)
          link.click()
          document.body.removeChild(link); //下载完成移除元素
          window.URL.revokeObjectURL(url); //释放掉blob对象
        }
        this.loading = false // éšè—é®ç½©
      })
    },
  },
src/views/base/WarehouseList.vue
@@ -1,7 +1,6 @@
<template>
  <a-card
    :bordered="false"
    title="供应商"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
@@ -11,10 +10,7 @@
      >
        <a-row :gutter="30">
          <a-col
            :md="6"
            :sm="24"
          >
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="仓库编号">
              <j-input
                placeholder="请输入仓库编号检索"
@@ -23,10 +19,7 @@
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="24"
          >
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="仓库名称">
              <j-input
                placeholder="请输入仓库名称检索"
@@ -34,22 +27,19 @@
              ></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        type="primary"
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
@@ -70,17 +60,7 @@
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}"
        @change="handleTableChange"
        :customRow="clickThenCheck"
      >
        <span
          slot="partCount"
          slot-scope="text,record"
          class="fontweight"
        >
          {{record.partCount}}
        </span>
        <!--状态栏个性展示-->
        <span
          slot="status"
@@ -181,9 +161,7 @@
  },
  data() {
    return {
      selectedRowRecord: {},
      dataSource: [],
      partCount: "",
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
@@ -238,7 +216,6 @@
          scopedSlots: { customRender: 'action' },
        }
      ],
      type: "radio",
      url: {
        list: '/base/lineSideWarehouse/list',
        delete: '/base/lineSideWarehouse/delete',
@@ -247,9 +224,7 @@
    }
  },
  mounted() {
    this.$bus.$on('refreshParentPage', (data) => {
      this.loadData();
    })
  },
  methods: {
    loadData(arg) {
@@ -291,19 +266,6 @@
          that.$message.warning(res.message);
        }
      });
    },
    clickThenCheck(record) {
      return {
        on: {
          click: (e) => {
            this.selectedRowRecord = record;
            this.onSelectChange(record.id.split(","), [record]);
          }
        }
      };
    },
    onSelectChange(selectedRowKeys) {
      this.selectedRowKeys = selectedRowKeys;
    },
  },
src/views/base/modules/group/GroupModal.vue
@@ -12,13 +12,13 @@
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form"  v-bind="layout"  :model="model" :rules="validatorRules">
        <a-form-model-item label="班组编码" required prop="groupCode">
        <a-form-model-item label="班组编码" required prop="groupCode" :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-input v-model="model.groupCode" :disabled="roleDisabled"  placeholder="请输入班组编码"/>
        </a-form-model-item>
        <a-form-model-item label="班组名称" required prop="groupName">
        <a-form-model-item label="班组名称" required prop="groupName" :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-input v-model="model.groupName" placeholder="请输入班组名称"/>
        </a-form-model-item>
         <a-form-model-item label="班组长" prop="groupManager">
         <a-form-model-item label="班组长" prop="groupManager" :labelCol="labelCol" :wrapperCol="wrapperCol">
          <j-dict-select-tag
                type="list"
                v-model="model.groupManager"
@@ -27,16 +27,16 @@
                placeholder="请选择班组长"
              />
        </a-form-model-item>
         <a-form-model-item label="产线" prop="factoryId">
          <j-dict-select-tag
                type="list"
                v-model="model.factoryId"
                :trigger-change="true"
                dictCode="base_factory,factory_name,id"
                placeholder="请选择产线"
              />
         <a-form-model-item label="产线" prop="factoryId" :labelCol="labelCol" :wrapperCol="wrapperCol">
         <j-select-factory
            v-model="model.factoryId"
            :multi="true"
            @back="backFactoryInfo"
            :backProduction="true"
            :treeProductOpera="true"
          ></j-select-factory>
        </a-form-model-item>
         <a-form-model-item label="班次" prop="shiftId">
         <a-form-model-item label="班次" prop="shiftId" :labelCol="labelCol" :wrapperCol="wrapperCol">
          <j-dict-select-tag
                type="list"
                v-model="model.shiftId"
@@ -45,7 +45,7 @@
                placeholder="请选择班次"
              />
        </a-form-model-item>
        <a-form-model-item label="备注" prop="remark">
        <a-form-model-item label="备注" prop="remark" :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-textarea :rows="5" v-model="model.remark" placeholder="请输入备注"/>
        </a-form-model-item>
      </a-form-model>
@@ -57,10 +57,12 @@
  import {duplicateCheck } from '@/api/api'
  import {postAction,requestPut} from '@/api/manage'
  import JDictSelectTag from '@/components/dict/JDictSelectTag'
  import JSelectFactory from '../../../../components/jeecgbiz/JSelectFactory'
  export default {
    name: "GroupModal",
    components: {
    JDictSelectTag,
    JSelectFactory
  },
    data () {
      return {
@@ -68,9 +70,13 @@
        visible: false,
        roleDisabled: false,
        model: {},
        layout: {
          labelCol: { span: 3 },
          wrapperCol: { span: 14 },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        confirmLoading: false,
        validatorRules:{
@@ -90,7 +96,8 @@
        url: {
          add: "/base/shiftGroup/add",
          edit: "/base/shiftGroup/edit",
        }
        },
        nextFactoryOptions: [],
      }
    },
    created () {
@@ -161,7 +168,14 @@
            }
          });
        }
      }
      },
      backFactoryInfo(info) {
        this.model.factoryIds = this.model.factoryId
        this.nextFactoryOptions = info.map((item, index, arr) => {
          let c = { label: item.text, value: item.value + '' }
          return c
        })
      },
    }
  }
</script>
src/views/base/modules/shift/ShiftModel.vue
@@ -1,30 +1,30 @@
<template>
  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" :okButtonProps="{ props: {disabled: disableSubmit} }"
           @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="班次编码" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input allow-clear placeholder="请输入班次编码"
              <a-input allow-clear placeholder="请输入班次编码" :disabled="disableSubmit"
                       v-decorator="['shiftCode',validatorRules.shiftCode]"/>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="班次名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input allow-clear placeholder="请输入班次名称" v-decorator="['shiftName',validatorRules.shiftName]"/>
              <a-input allow-clear placeholder="请输入班次名称" :disabled="disableSubmit" v-decorator="['shiftName',validatorRules.shiftName]"/>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="开始时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-time-picker v-decorator="['startTime',validatorRules.startTime]"/>
             <a-time-picker :disabled="disableSubmit" v-decorator="['startTime',validatorRules.startTime]"/>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="结束时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
             <a-time-picker v-decorator="['endTime',validatorRules.endTime]"/>
             <a-time-picker :disabled="disableSubmit" v-decorator="['endTime',validatorRules.endTime]"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -32,12 +32,12 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="工作时长" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input-number v-decorator="['workHours',validatorRules.workHours]" placeholder="请输入工作时长(小时)" style="width: 100%" />
              <a-input-number :disabled="disableSubmit" v-decorator="['workHours',validatorRules.workHours]" placeholder="请输入工作时长(小时)" style="width: 100%" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="是否跨天" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-switch v-model="crossDayFlag" checked-children="是" un-checked-children="否"/>
              <a-switch :disabled="disableSubmit" v-model="crossDayFlag" checked-children="是" un-checked-children="否"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -154,8 +154,8 @@
        this.$nextTick(() => {
          this.form.setFieldsValue(pick(this.model, 'shiftCode', 'shiftName', 'startTime', 'endTime','workHours'))
          this.form.setFieldsValue({
            startTime: moment(this.model.startTime, 'HH:mm:ss'),
            endTime: moment(this.model.endTime, 'HH:mm:ss')
            startTime: moment(this.model.startTime, 'HH:mm'),
            endTime: moment(this.model.endTime, 'HH:mm')
          })
          if (record.crossDayFlag == '1') {
            this.crossDayFlag = true
@@ -181,8 +181,8 @@
            }else if(that.crossDayFlag == false){
              formData.crossDayFlag = '0'
            }
            formData.startTime = moment(formData.startTime).format('HH:mm:ss')
            formData.endTime = moment(formData.endTime).format('HH:mm:ss')
            formData.startTime = moment(formData.startTime).format('HH:mm')
            formData.endTime = moment(formData.endTime).format('HH:mm')
            if (formData.crossDayFlag == '0') {
               let startTimeOne = formData.startTime.replace(/:/g, '')
              let endTimeOne = formData.endTime.replace(/:/g, '')
@@ -297,7 +297,10 @@
          }
        })
      },
// å…³é—­å¼¹çª—时清除表单校验
    removeValidate() {
      if (this.$refs.form) this.$refs.form.clearValidate()
    }
    }
  }
</script>
src/views/base/modules/supplier/SupplierModel.vue
@@ -20,7 +20,7 @@
              label="供应商编号"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入供应商编号"
                v-decorator="['supplierCode', validatorRules.supplierCode ]"
@@ -37,7 +37,7 @@
              label="供应商名称"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入供应商名称"
                v-decorator="['supplierName', validatorRules.supplierName ]"
@@ -53,7 +53,7 @@
              label="国家"
            >
            <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入国家"
                v-decorator="['country', validatorRules.country ]"
@@ -74,7 +74,7 @@
              label="省份"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入省份"
                v-decorator="['province', validatorRules.province ]"
@@ -91,7 +91,7 @@
              label="城市"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入城市"
                v-decorator="['city', validatorRules.city ]"
@@ -105,7 +105,7 @@
              label="联系人"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入联系人"
                v-decorator="['contact', validatorRules.contact]"
@@ -122,7 +122,7 @@
              label="详细地址"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入详细地址"
                v-decorator="['address', validatorRules.address]"
@@ -139,7 +139,7 @@
              label="邮箱"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入邮箱"
                v-decorator="['email', validatorRules.email]"
@@ -153,7 +153,7 @@
              label="邮编"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入邮编"
                v-decorator="['postcode', validatorRules.postcode]"
@@ -170,7 +170,7 @@
              label="传真"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入传真"
                v-decorator="['fax', validatorRules.fax]"
@@ -184,7 +184,7 @@
              label="手机号码"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入手机号码"
                v-decorator="['phone', validatorRules.phone]"
@@ -201,7 +201,7 @@
              label="公司电话"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入公司电话"
                v-decorator="['companyTelephone', validatorRules.companyTelephone]"
@@ -215,7 +215,7 @@
              label="官方网站"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入官方网站"
                v-decorator="['officialWebsite', validatorRules.officialWebsite]"
@@ -232,7 +232,7 @@
              label="备注"
            >
              <a-textarea
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                placeholder="请输入备注"
                allow-clear
                v-decorator="['remark', validatorRules.remark]"
@@ -495,6 +495,10 @@
        }
      }
    },
    // å…³é—­å¼¹çª—时清除表单校验
    removeValidate() {
      if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
</script>
src/views/base/modules/warehouse/WarehouseModel.vue
@@ -15,12 +15,12 @@
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="线边库编号"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入线边库编号"
                v-decorator="['warehouseCode', validatorRules.warehouseCode ]"
@@ -32,12 +32,12 @@
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="线边库名称"
            >
              <a-input
                :readOnly="disableSubmit"
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入线边库名称"
                v-decorator="['warehouseName', validatorRules.warehouseName ]"
@@ -46,19 +46,20 @@
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="产线"
            >
            <j-dict-select-tag
                type="list"
                v-model="model.factoryId"
                :trigger-change="true"
                dictCode="base_factory,factory_name,id"
                placeholder="请选择产线"
              />
            <j-select-factory
            :disabled="disableSubmit"
            v-model="model.factoryId"
            :multi="true"
            @back="backFactoryInfo"
            :backProduction="true"
            :treeProductOpera="true"
          ></j-select-factory>
            </a-form-item>
          </a-col>
        </a-row>
@@ -74,12 +75,14 @@
import moment from 'moment'
import { duplicateCheck } from '@/api/api'//重复校验
import JTreeDict from '@/components/jeecg/JTreeDict'//分类字典树形下拉组件
import JSelectFactory from '../../../../components/jeecgbiz/JSelectFactory'
export default {
  name: "WarehouseModal",
  components: {
    JDate,
    JTreeDict,
    JSelectFactory
  },
  data() {
    return {
@@ -90,13 +93,13 @@
      treeData: [],
      warehouseId: "", //保存线边库id
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
      confirmLoading: false,
      form: this.$form.createForm(this),
@@ -120,6 +123,7 @@
        add: "/base/lineSideWarehouse/add",
        edit: "/base/lineSideWarehouse/edit",
      },
      nextFactoryOptions: [],
    }
  },
  created() {
@@ -212,6 +216,17 @@
        }
      })
    },
     backFactoryInfo(info) {
        this.model.factoryIds = this.model.factoryId
        this.nextFactoryOptions = info.map((item, index, arr) => {
          let c = { label: item.text, value: item.value + '' }
          return c
        })
      },
      // å…³é—­å¼¹çª—时清除表单校验
    removeValidate() {
      if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
</script>
src/views/modules/message/SysMessageTemplateList.vue
@@ -101,7 +101,7 @@
                  <a @click="handleUse(record)">应用</a>
              </a-menu-item>
               <a-menu-item>
                  <a @click="handleNotUse(record)">停用</a>
                  <a @click="handleNotUse(record)">禁用</a>
              </a-menu-item>
           
              <a-menu-item>
src/views/qms/InspectionItemList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,332 @@
<template>
  <a-card
    :bordered="false"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="30">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="检验项目编号">
              <j-input
                placeholder="请输入检验项目编号检索"
                v-model="queryParam.itemCode"
              ></j-input>
            </a-form-item>
          </a-col>
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="检验项目名称">
              <j-input
                placeholder="请输入检验项目名称检索"
                v-model="queryParam.itemName"
              ></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
      >新增</a-button>
    </div>
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        filterMultiple="filterMultiple"
        :columns="columns"
        :rowClassName="tableRowClass"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
      >
        <!--状态栏个性展示-->
        <span
          slot="status"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.itemStatus==1"
            status="success"
          />
          <span
            v-if="record.itemStatus==1"
            class="success"
          >启用</span>
          <a-badge
            v-if="record.itemStatus==0"
            status="error"
          />
          <span
            v-if="record.itemStatus==0"
            class="error"
          >禁用</span>
        </span>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >详情</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多
              <a-icon type="down" />
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleEdit(record)">编辑</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.itemStatus == 0">
                <a-popconfirm
                  title="确定启用吗?"
                  @confirm="() => handleActive(record.id)"
                >
                  <a>启用</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.itemStatus == 1">
                <a-popconfirm
                  title="确定禁用吗?"
                  @confirm="() => handleActive(record.id)"
                >
                  <a>禁用</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <!-- è¡¨å•区域 -->
    <inspection-item-model
      ref="modalForm"
      @ok="modalFormOk"
    ></inspection-item-model>
  </a-card>
</template>
<script>
//按需引入 ç»„ä»¶
import InspectionItemModel from './modules/inspectionItem/InspectionItemModel'
import { deleteAction, requestPut, getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
import JInput from '@/components/jeecg/JInput'
export default {
  name: 'InspectionItemList',
  mixins: [JeecgListMixin],
  components: {
    InspectionItemModel,
    JEllipsis,
    JInput,
  },
  data() {
    return {
      dataSource: [],
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 5,
        pageSizeOptions: ['5', '10', '20'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " å…±" + total + "条"
        },
        total: 0
      },
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '检验项目编号',
          align: "center",
          dataIndex: 'itemCode'
        },
        {
          title: '检验项目名称',
          align: "center",
          dataIndex: 'itemName'
        },
        {
          title: '检验项目分类',
          align: "center",
          dataIndex: 'itemCategory'
        },
        {
          title: '定量/定性',
          align: "center",
          dataIndex: 'qualitativeOrQuantitative'
        },
        {
          title: '测量工具',
          align: "center",
          dataIndex: 'inspectionTools'
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark'
        },
        {
          width: 100,
          title: '状态',
          align: 'center',
          scopedSlots: {
            customRender: 'status',
          },
          dataIndex: 'itemStatus'
        },
        {
          width: 150,
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' },
        }
      ],
      url: {
        list: '/qms/inspectionItem/list',
        delete: '/qms/inspectionItem/delete',
        active: '/qms/inspectionItem/active',
      },
    }
  },
  mounted() {
  },
  methods: {
    loadData(arg) {
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records;
          this.ipagination.total = res.result.total;
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false;
      })
    },
    //禁用状态样式
    tableRowClass(record, index) {
      if (record.warehouseStatus != "1") {
        return "frozenRowClass";
      }
      return "";
    },
    //启用禁用
    handleActive(id) {
      if (!this.url.active) {
        this.$message.error("请设置url.active!")
        return
      }
      let that = this;
      requestPut(that.url.active, {}, { id: id }).then((res) => {
        if (res.success) {
          that.$message.success(res.message);
          that.loadData();
        } else {
          that.$message.warning(res.message);
        }
      });
    },
  },
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.frozenRowClass {
  color: #c9c9c9;
}
.success {
  color: green;
}
.error {
  color: red;
}
.fontweight {
  font-weight: bold;
}
.ant-card-body .table-operator {
  margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
  padding-top: 15px;
  padding-bottom: 15px;
}
.anty-row-operator button {
  margin: 0 5px;
}
/deep/.ant-btn-danger {
  background-color: #ffffff;
}
.ant-modal-cust-warp {
  height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
  height: calc(100% - 110px) !important;
  overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
  height: 90% !important;
  overflow-y: hidden;
}
</style>
src/views/qms/InspectionToolsList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,317 @@
<template>
  <a-card
    :bordered="false"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="30">
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="检验工具编码">
              <j-input
                placeholder="请输入检验工具编码检索"
                v-model="queryParam.toolCode"
              ></j-input>
            </a-form-item>
          </a-col>
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <a-form-item label="检验工具名称">
              <j-input
                placeholder="请输入检验工具名称检索"
                v-model="queryParam.toolName"
              ></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="4" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
      >新增</a-button>
    </div>
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        filterMultiple="filterMultiple"
        :columns="columns"
        :rowClassName="tableRowClass"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
      >
        <!--状态栏个性展示-->
        <span
          slot="status"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.toolStatus==1"
            status="success"
          />
          <span
            v-if="record.toolStatus==1"
            class="success"
          >启用</span>
          <a-badge
            v-if="record.toolStatus==0"
            status="error"
          />
          <span
            v-if="record.toolStatus==0"
            class="error"
          >禁用</span>
        </span>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >详情</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多
              <a-icon type="down" />
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleEdit(record)">编辑</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.toolStatus == 0">
                <a-popconfirm
                  title="确定启用吗?"
                  @confirm="() => handleActive(record.id)"
                >
                  <a>启用</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="record.toolStatus == 1">
                <a-popconfirm
                  title="确定禁用吗?"
                  @confirm="() => handleActive(record.id)"
                >
                  <a>禁用</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <!-- è¡¨å•区域 -->
    <inspection-tools-model
      ref="modalForm"
      @ok="modalFormOk"
    ></inspection-tools-model>
  </a-card>
</template>
<script>
//按需引入 ç»„ä»¶
import InspectionToolsModel from './modules/inspectionTools/InspectionToolsModel'
import { deleteAction, requestPut, getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
import JInput from '@/components/jeecg/JInput'
export default {
  name: 'InspectionToolsList',
  mixins: [JeecgListMixin],
  components: {
    InspectionToolsModel,
    JEllipsis,
    JInput,
  },
  data() {
    return {
      dataSource: [],
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 5,
        pageSizeOptions: ['5', '10', '20'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " å…±" + total + "条"
        },
        total: 0
      },
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '检验工具编码',
          align: "center",
          dataIndex: 'toolCode'
        },
        {
          title: '检验工具名称',
          align: "center",
          dataIndex: 'toolName'
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark'
        },
        {
          width: 100,
          title: '状态',
          align: 'center',
          scopedSlots: {
            customRender: 'status',
          },
          dataIndex: 'toolStatus'
        },
        {
          width: 150,
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' },
        }
      ],
      url: {
        list: '/qms/inspectionTools/list',
        delete: '/qms/inspectionTools/delete',
        active: '/qms/inspectionTools/active',
      },
    }
  },
  mounted() {
  },
  methods: {
    loadData(arg) {
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records;
          this.ipagination.total = res.result.total;
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false;
      })
    },
    //禁用状态样式
    tableRowClass(record, index) {
      if (record.warehouseStatus != "1") {
        return "frozenRowClass";
      }
      return "";
    },
    //启用禁用
    handleActive(id) {
      if (!this.url.active) {
        this.$message.error("请设置url.active!")
        return
      }
      let that = this;
      requestPut(that.url.active, {}, { id: id }).then((res) => {
        if (res.success) {
          that.$message.success(res.message);
          that.loadData();
        } else {
          that.$message.warning(res.message);
        }
      });
    },
  },
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.frozenRowClass {
  color: #c9c9c9;
}
.success {
  color: green;
}
.error {
  color: red;
}
.fontweight {
  font-weight: bold;
}
.ant-card-body .table-operator {
  margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
  padding-top: 15px;
  padding-bottom: 15px;
}
.anty-row-operator button {
  margin: 0 5px;
}
/deep/.ant-btn-danger {
  background-color: #ffffff;
}
.ant-modal-cust-warp {
  height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
  height: calc(100% - 110px) !important;
  overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
  height: 90% !important;
  overflow-y: hidden;
}
</style>
src/views/qms/modules/inspectionItem/InspectionItemModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,274 @@
<template>
  <a-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="检验项目编号"
            >
              <a-input
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入检验项目编号"
                v-decorator="['itemCode', validatorRules.itemCode ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="检验项目名称"
            >
              <a-input
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入检验项目名称"
                v-decorator="['itemName', validatorRules.itemName ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
         <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="检验项目分类"
            >
              <j-dict-select-tag
              :disabled="disableSubmit"
              placeholder="请输入检验项目分类"
              v-decorator="['itemCategory', validatorRules.itemCategory ]"
              dictCode="item_category"/>
            </a-form-item>
          </a-col>
        </a-row>
         <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="定量/定性"
            >
              <j-dict-select-tag
                :disabled="disableSubmit"
                placeholder="请选择定量/定性"
                v-decorator="['qualitativeOrQuantitative', validatorRules.qualitativeOrQuantitative ]"
                dictCode="qualitative_or_quantitative"/>
            </a-form-item>
          </a-col>
        </a-row>
         <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="测量工具"
            >
              <a-input
                :disabled="disableSubmit"
                allow-clear
                placeholder="请选择测量工具"
                v-decorator="['inspectionTools', validatorRules.inspectionTools ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="备注"
            >
            <a-textarea :disabled="disableSubmit" placeholder="请输入备注" v-decorator="['remark', validatorRules.remark ]"/>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
  </a-modal>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { duplicateCheck } from '@/api/api'//重复校验
export default {
  name: "InspectionItemModal",
  data() {
    return {
      title: "操作",
      visible: false,
      disableSubmit: false,
      model: {},
      inspectionItemId: "", //保存检验项目id
      labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        itemCode: {
          rules: [
            { required: true, message: '请输入检验项目编码' },
            { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateNum },
          ]
        },
        itemName: {
          rules: [
            { required: true, message: '请输入检验项目名称' },
            { min: 0, max: 64, message: '长度不超过 64 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateName },
          ]
        },
      },
      url: {
        add: "/qms/inspectionItem/add",
        edit: "/qms/inspectionItem/edit",
      },
    }
  },
  created() {
  },
  methods: {
    add() {
      this.edit({});
    },
    edit(record) {
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.inspectionItemId = record.id;
      this.visible = true;
      this.$nextTick(() => {
        this.form.setFieldsValue(
          pick(this.model, 'itemCode', 'itemName','itemCategory','qualitativeOrQuantitative','inspectionTools', 'remark')
        )
      });
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let httpurl = '';
          let method = '';
          if (!this.model.id) {
            httpurl += this.url.add;
            method = 'post';
          } else {
            httpurl += this.url.edit;
            method = 'put';
          }
          let formData = Object.assign(this.model, values);
          httpAction(httpurl, formData, method).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleCancel() {
      this.close()
    },
    //验证 ç¼–号
    validateNum(rule, value, callback) {
      var params = {
        tableName: 'qms_inspection_item',
        fieldName: 'item_code',
        fieldVal: value,
        dataId: this.inspectionItemId,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: 'true',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("检验项目编号已存在!");
        }
      })
    },
    //验证 åç§°
    validateName(rule, value, callback) {
      var params = {
        tableName: 'qms_inspection_items',
        fieldName: 'item_name',
        fieldVal: value,
        dataId: this.inspectionItemId,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: 'true',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("检验项目名称已存在!");
        }
      })
    },
    // å…³é—­å¼¹çª—时清除表单校验
    removeValidate() {
      if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>
src/views/qms/modules/inspectionTools/InspectionToolsModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,228 @@
<template>
  <a-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="检验工具编码"
            >
              <a-input
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入检验工具编码"
                v-decorator="['toolCode', validatorRules.toolCode ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="检验工具名称"
            >
              <a-input
                :disabled="disableSubmit"
                allow-clear
                placeholder="请输入检验工具名称"
                v-decorator="['toolName', validatorRules.toolName ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="备注"
            >
            <a-textarea :disabled="disableSubmit" placeholder="请输入备注" v-decorator="['remark', validatorRules.remark ]"/>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
  </a-modal>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { duplicateCheck } from '@/api/api'//重复校验
export default {
  name: "InspectionToolsModal",
  data() {
    return {
      title: "操作",
      visible: false,
      disableSubmit: false,
      model: {},
      inspectionToolsId: "", //保存检验工具id
      labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        toolCode: {
          rules: [
            { required: true, message: '请输入检验工具编码' },
            { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateNum },
          ]
        },
        toolName: {
          rules: [
            { required: true, message: '请输入检验工具名称' },
            { min: 0, max: 64, message: '长度不超过 64 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateName },
          ]
        },
      },
      url: {
        add: "/qms/inspectionTools/add",
        edit: "/qms/inspectionTools/edit",
      },
    }
  },
  created() {
  },
  methods: {
    add() {
      this.edit({});
    },
    edit(record) {
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.inspectionToolsId = record.id;
      this.visible = true;
      this.$nextTick(() => {
        this.form.setFieldsValue(
          pick(this.model, 'toolCode', 'toolName', 'remark')
        )
      });
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let httpurl = '';
          let method = '';
          if (!this.model.id) {
            httpurl += this.url.add;
            method = 'post';
          } else {
            httpurl += this.url.edit;
            method = 'put';
          }
          let formData = Object.assign(this.model, values);
          httpAction(httpurl, formData, method).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleCancel() {
      this.close()
    },
    //验证 ç¼–号
    validateNum(rule, value, callback) {
      var params = {
        tableName: 'qms_inspection_tools',
        fieldName: 'tool_code',
        fieldVal: value,
        dataId: this.inspectionToolsId,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: 'true',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("检验工具编码已存在!");
        }
      })
    },
    //验证 åç§°
    validateName(rule, value, callback) {
      var params = {
        tableName: 'qms_inspection_tools',
        fieldName: 'tool_name',
        fieldVal: value,
        dataId: this.inspectionToolsId,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: 'true',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("检验工具名称已存在!");
        }
      })
    },
    // å…³é—­å¼¹çª—时清除表单校验
    removeValidate() {
      if (this.$refs.form) this.$refs.form.clearValidate()
    }
  }
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>
src/views/system/modules/UserModal.vue
@@ -139,22 +139,22 @@
          label="车间分配"
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          v-show="!productionDisabled"
          v-show="!factoryDisabled"
        >
          <j-select-production
            v-model="model.selectedProduction"
          <j-select-factory
            v-model="model.selectedFactory"
            :multi="true"
            @back="backProductionInfo"
            @back="backFactoryInfo"
            :backProduction="true"
            :treeProductOpera="true"
          ></j-select-production>
          ></j-select-factory>
        </a-form-model-item>
        <!--<a-form-model-item-->
          <!--label="选择设备"-->
          <!--:labelCol="labelCol"-->
          <!--:wrapperCol="wrapperCol"-->
          <!--v-show="!productionDisabled"-->
          <!--v-show="!factoryDisabled"-->
        <!--&gt;-->
          <!--<a-input-search-->
            <!--:readOnly="true"-->
@@ -162,7 +162,7 @@
            <!--@search="deviceSearch"-->
            <!--enter-button-->
            <!--placeholder="请选择设备"-->
            <!--:disabled="!model.selectedProduction"-->
            <!--:disabled="!model.selectedFactory"-->
          <!--/>-->
        <!--</a-form-model-item>-->
@@ -350,7 +350,7 @@
  import { addUser, editUser, queryUserRole, queryall } from '@/api/api'
  import { disabledAuthFilter } from '@/utils/authFilter'
  import { duplicateCheck } from '@/api/api'
  import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction'
  import JSelectFactory from '../../../components/jeecgbiz/JSelectFactory'
  import { mapActions } from 'vuex'
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  // import SelectDeviceModal from './SelectDeviceModal'
@@ -359,12 +359,12 @@
    name: 'UserModal',
    components: {
      // SelectDeviceModal,
      JSelectProduction
      JSelectFactory
    },
    data() {
      return {
        departDisabled: false, //是否是我的部门调用该页面
        productionDisabled: false, //是否是我的车间调用该页面
        factoryDisabled: false, //是否是我的车间调用该页面
        roleDisabled: false, //是否是角色维护调用该页面
        modalWidth: 800,
        drawerWidth: 700,
@@ -420,10 +420,10 @@
        tenantsOptions: [],
        rolesOptions: [],
        nextDepartOptions: [],
        nextProductionOptions: [],
        nextFactoryOptions: [],
        isDepartType: '',
        model: {
          selectedProduction: ''
          selectedFactory: ''
        }
      }
    },
@@ -433,7 +433,7 @@
          if (value) this.initDictData('password_length')
        }
      },
      'model.selectedProduction': {
      'model.selectedFactory': {
        handler(newVal, oldVal) {
          if (newVal) {
            // å¦‚果车间选择前后不一致则重置选择设备
@@ -481,7 +481,7 @@
          userIdentity: 1,
          selectedroles: '',
          selecteddeparts: '',
          selectedProduction: ''
          selectedFactory: ''
        })
      },
      edit(record) {
@@ -578,19 +578,19 @@
        // èŽ·å–è½¦é—´åˆ†é…
        getAction(that.url.userProductionList, { userId: userid }).then((res) => {
          if (res.success) {
            let ProductionOptions = []
            let selectProductKeys = []
            let FactoryOptions = []
            let selectFactoryKeys = []
            for (let i = 0; i < res.result.length; i++) {
              selectProductKeys.push(res.result[i].key)
              selectFactoryKeys.push(res.result[i].key)
              //新增负责部门选择下拉框
              ProductionOptions.push({
              FactoryOptions.push({
                value: res.result[i].key,
                label: res.result[i].title
              })
            }
            this.$set(this.model, 'selectedProduction', selectProductKeys.join(','))
            that.nextProductionOptions = ProductionOptions
            this.$set(this.model, 'selectedFactory', selectFactoryKeys.join(','))
            that.nextFactoryOptions = FactoryOptions
          }
        })
        //车间的url
@@ -602,9 +602,9 @@
          return c
        })
      },
      backProductionInfo(info) {
        this.model.productionIds = this.model.selectedProduction
        this.nextProductionOptions = info.map((item, index, arr) => {
      backFactoryInfo(info) {
        this.model.factoryIds = this.model.selectedFactory
        this.nextFactoryOptions = info.map((item, index, arr) => {
          let c = { label: item.text, value: item.value + '' }
          return c
        })
@@ -613,7 +613,7 @@
      refresh() {
        this.userId = ''
        this.nextDepartOptions = []
        this.nextProductionOptions = []
        this.nextFactoryOptions = []
        this.departIdShow = false
      },
      close() {
@@ -621,7 +621,7 @@
        this.visible = false
        this.disableSubmit = false
        this.nextDepartOptions = []
        this.nextProductionOptions = []
        this.nextFactoryOptions = []
        this.departIdShow = false
        this.$refs.form.resetFields()
      },