| | |
| | | |
| | | <!-- æé®æä½åºå --> |
| | | <a-row style="margin-left: 14px"> |
| | | <a-button @click="handleAdd(1)" type="primary">æ·»å 车é´</a-button> |
| | | <a-button @click="handleAdd(2)" type="primary">æ·»å ä¸çº§</a-button> |
| | | <a-button @click="handleAdd(1)" type="primary">æ·»å å·¥å</a-button> |
| | | <a-button v-if="this.factoryCategory == '1' || this.factoryCategory == '2'" @click="handleAdd(2)" type="primary">æ·»å ä¸çº§</a-button> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('车é´ä¿¡æ¯')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" |
| | | :action="importExcelUrl" @change="handleImportExcel"> |
| | |
| | | <a-tab-pane tab="åºæ¬ä¿¡æ¯" key="1"> |
| | | <a-card :bordered="false" v-if="selectedKeys.length>0"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryCode" label="车é´ç¼å·"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryCode" :label="codeLabel"> |
| | | <a-input placeholder="请è¾å
¥äº§çº¿/车é´ç¼å·" v-model="model.factoryCode"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryName" label="车é´åç§°"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryName" :label="nameLabel"> |
| | | <a-input placeholder="请è¾å
¥äº§çº¿/车é´åç§°" v-model="model.factoryName"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ä¸çº§è½¦é´"> |
| | | <a-form-model-item v-if="this.factoryCategory == '3'" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionType" :label="nameLabel"> |
| | | <j-dict-select-tag type="list" placeholder="è¯·éæ©äº§çº¿ç±»å" v-model="model.productionType" dictCode="production_type"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ç¶èç¹"> |
| | | <a-tree-select |
| | | style="width:100%" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="æåº"> |
| | | <a-input-number v-model="model.sorter"/> |
| | | <a-input-number v-model="model.sorter" style="width:100%"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.remark"/> |
| | |
| | | edges: [] |
| | | }, |
| | | validatorRules: { |
| | | factoryName: [{ required: true, message: '请è¾å
¥äº§çº¿/车é´åç§°!' }] |
| | | factoryCode:[{ required: true, message: '请è¾å
¥å·¥å/车é´/产线ç¼å·!' }], |
| | | factoryName:[{ required: true, message: '请è¾å
¥å·¥å/车é´/产线åç§°!' }], |
| | | productionType:[{ required: false, message: 'è¯·éæ©äº§çº¿ç±»å!' }], |
| | | }, |
| | | url: { |
| | | delete: '/base/factory/delete', |
| | |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | // æ°å¢è®¡ç®å±æ§ï¼å¨æç¼å·æ ç¾ |
| | | codeLabel() { |
| | | if (!this.currSelected.factoryCategory) return "车é´ç¼å·"; |
| | | const typeMap = { |
| | | '1': 'å·¥åç¼å·', |
| | | '2': '车é´ç¼å·', |
| | | '3': '产线ç¼å·' |
| | | }; |
| | | return typeMap[this.currSelected.factoryCategory] || "车é´ç¼å·"; |
| | | }, |
| | | // æ°å¢è®¡ç®å±æ§ï¼å¨æåç§°æ ç¾ |
| | | nameLabel() { |
| | | if (!this.currSelected.factoryCategory) return "车é´åç§°"; |
| | | const typeMap = { |
| | | '1': 'å·¥ååç§°', |
| | | '2': '车é´åç§°', |
| | | '3': '产线åç§°' |
| | | }; |
| | | return typeMap[this.currSelected.factoryCategory] || "车é´åç§°"; |
| | | } |
| | | }, |
| | | methods: { |
| | | loadData() { |
| | |
| | | this.setValuesToForm(record) |
| | | if(record.factoryCategory == '3'){ |
| | | this.$refs.userFactory.show(record.id) |
| | | this.validatorRules.productionType[0].required = true |
| | | }else{ |
| | | this.$refs.userFactory.factoryId = '' |
| | | } |
| | |
| | | }) |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | | this.$refs.departModal.add(this.selectedKeys,this.factoryCategory) |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } else { |
| | | this.$refs.departModal.add(this.currSelected) |
| | |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä»åºç¼å·"> |
| | | <a-form-item label="线边åºç¼å·"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä»åºç¼å·æ£ç´¢" |
| | | placeholder="请è¾å
¥çº¿è¾¹åºç¼å·æ£ç´¢" |
| | | v-model="queryParam.warehouseCode" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ä»åºåç§°"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="线边åºåç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ä»åºåç§°æ£ç´¢" |
| | | placeholder="请è¾å
¥çº¿è¾¹åºåç§°æ£ç´¢" |
| | | v-model="queryParam.warehouseName" |
| | | ></j-input> |
| | | </a-form-item> |
| | |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | >æ°å¢ |
| | | </a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | | >详æ
</a> |
| | | @click="handleEdit(record)" |
| | | >ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item v-if="record.warehouseStatus==1"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.warehouseStatus == 0"> |
| | | <a-menu-item v-if="record.warehouseStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | |
| | | </a-menu-item> |
| | | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | |
| | | //æéå¼å
¥ ç»ä»¶ |
| | | import WarehouseModel from './modules/warehouse/WarehouseModel' |
| | | |
| | | import { deleteAction, requestPut, getAction } from '@/api/manage' |
| | | import { getAction, requestPut } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | |
| | | components: { |
| | | WarehouseModel, |
| | | JEllipsis, |
| | | JInput, |
| | | JInput |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | /* æåºåæ° */ |
| | | isorter:{ |
| | | column: 'warehouseCode', |
| | | order: 'asc', |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '线边åºç¼å·', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'warehouseCode' |
| | | }, |
| | | { |
| | | title: '线边åºåç§°', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'warehouseName' |
| | | }, |
| | | { |
| | |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status', |
| | | customRender: 'status' |
| | | }, |
| | | dataIndex: 'warehouseStatus' |
| | | }, |
| | |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/base/lineSideWarehouse/list', |
| | | delete: '/base/lineSideWarehouse/delete', |
| | | active: '/base/lineSideWarehouse/active', |
| | | }, |
| | | active: '/base/lineSideWarehouse/active' |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | 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; |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != "1") { |
| | | return "frozenRowClass"; |
| | | if (record.warehouseStatus != '1') { |
| | | return 'frozenRowClass' |
| | | } |
| | | return ""; |
| | | return '' |
| | | }, |
| | | //å¯ç¨ç¦ç¨ |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error("请设置url.active!") |
| | | this.$message.error('请设置url.active!') |
| | | return |
| | | } |
| | | let that = this; |
| | | let that = this |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | 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; |
| | | } |
| | |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | /deep/.ant-btn-danger { |
| | | /deep/ .ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="车é´ç¼ç " |
| | | :label="codeLabel" |
| | | prop="factoryCode" |
| | | :hidden="false" |
| | | hasFeedback > |
| | | <a-input id="factoryCode" placeholder="请è¾å
¥äº§çº¿/车é´ç¼å·" v-model="model.factoryCode"/> |
| | | <a-input id="factoryCode" placeholder="请è¾å
¥å·¥å/产线/车é´ç¼å·" v-model="model.factoryCode"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="车é´åç§°" |
| | | :label="nameLabel" |
| | | prop="factoryName" |
| | | :hidden="false" |
| | | hasFeedback > |
| | | <a-input id="factoryName" placeholder="请è¾å
¥äº§çº¿/车é´åç§°" v-model="model.factoryName"/> |
| | | <a-input id="factoryName" placeholder="请è¾å
¥å·¥å/产线/车é´åç§°" v-model="model.factoryName"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="ä¸çº§è½¦é´" hasFeedback> |
| | | <a-form-model-item |
| | | v-if="this.factoryCategory == '2'" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="产线类å" |
| | | prop="productionType" |
| | | :hidden="false" |
| | | hasFeedback > |
| | | <j-dict-select-tag type="list" placeholder="è¯·éæ©äº§çº¿ç±»å" v-model="model.productionType" dictCode="production_type"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="ç¶èç¹" hasFeedback> |
| | | <a-tree-select |
| | | style="width:100%" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="factoryTree" |
| | | v-model="model.parentId" |
| | | placeholder="è¯·éæ©ä¸çº§è½¦é´" |
| | | placeholder="è¯·éæ©ç¶èç¹" |
| | | :disabled="condition"> |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æåº"> |
| | | <a-input-number v-model="model.sorter"/> |
| | | <a-input-number v-model="model.sorter" style="width:100%"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | |
| | | import { httpAction } from '@/api/manage' |
| | | import { queryById } from '@/api/api' |
| | | import pick from 'lodash.pick' |
| | | import JDictSelectTag from '../../../../components/dict/JDictSelectTag.vue' |
| | | export default { |
| | | name: "FactoryModal", |
| | | components: { }, |
| | | components: {JDictSelectTag }, |
| | | data () { |
| | | return { |
| | | factoryTree:[], |
| | | factoryCategory:'', |
| | | title:"æä½", |
| | | seen:false, |
| | | visible: false, |
| | |
| | | |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | | factoryName:[{ required: true, message: '请è¾å
¥äº§çº¿/车é´åç§°!' }], |
| | | factoryCode:[{ required: true, message: '请è¾å
¥å·¥å/车é´/产线ç¼å·!' }], |
| | | factoryName:[{ required: true, message: '请è¾å
¥å·¥å/车é´/产线åç§°!' }], |
| | | productionType:[{ required: false, message: 'è¯·éæ©äº§çº¿ç±»å!' }], |
| | | }, |
| | | url: { |
| | | add: "/base/factory/add", |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | computed: { |
| | | // æ°å¢è®¡ç®å±æ§ï¼å¨æç¼å·æ ç¾ |
| | | codeLabel() { |
| | | if (!this.factoryCategory) return "å·¥åç¼å·"; |
| | | const typeMap = { |
| | | '1': '车é´ç¼å·', |
| | | '2': '产线ç¼å·', |
| | | '3': '产线ç¼å·' |
| | | }; |
| | | return typeMap[this.factoryCategory] || "å·¥åç¼å·"; |
| | | }, |
| | | // æ°å¢è®¡ç®å±æ§ï¼å¨æåç§°æ ç¾ |
| | | nameLabel() { |
| | | if (!this.factoryCategory) return "å·¥ååç§°"; |
| | | const typeMap = { |
| | | '1': '车é´åç§°', |
| | | '2': '产线åç§°', |
| | | '3': '产线åç§°' |
| | | }; |
| | | return typeMap[this.factoryCategory] || "å·¥ååç§°"; |
| | | } |
| | | }, |
| | | methods: { |
| | | loadTreeData(){ |
| | |
| | | |
| | | }) |
| | | }, |
| | | add (factory) { |
| | | add (factory,factoryCategory) { |
| | | if(factory){ |
| | | this.seen = false; |
| | | this.dictDisabled = false; |
| | |
| | | this.seen = true; |
| | | this.dictDisabled = true; |
| | | } |
| | | this.edit(factory); |
| | | this.edit(factory,factoryCategory); |
| | | }, |
| | | edit (record) { |
| | | edit (record,factoryCategory) { |
| | | this.visible = true; |
| | | this.model = Object.assign({}, this.defaultModel, record) |
| | | if(factoryCategory == '2'){ |
| | | this.validatorRules.productionType[0].required = true |
| | | } |
| | | this.loadTreeData(); |
| | | this.model.parentId = record!=null?record.toString():null; |
| | | this.factoryCategory = factoryCategory |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | size="small" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns1" |
| | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | size="small" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns1" |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="线边åºç¼å·" |
| | | > |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="线边åºåç§°" |
| | | > |
| | |
| | | :wrapperCol="wrapperCol" |
| | | label="产线" |
| | | > |
| | | <j-select-factory |
| | | :disabled="disableSubmit" |
| | | v-model="model.factoryId" |
| | | :multi="true" |
| | | @back="backFactoryInfo" |
| | | :backProduction="true" |
| | | :treeProductOpera="true" |
| | | ></j-select-factory> |
| | | <j-dict-select-tag :disabled="disableSubmit" type="list" placeholder="è¯·éæ©äº§çº¿" |
| | | v-model="model.factoryId" |
| | | dictCode="base_factory,factory_name,id,del_flag='0' and factory_category='3'" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import { httpAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import moment from 'moment' |
| | | import { duplicateCheck } from '@/api/api'//é夿 ¡éª |
| | | import JTreeDict from '@/components/jeecg/JTreeDict'//åç±»åå
¸æ 形䏿ç»ä»¶ |
| | | import JSelectFactory from '../../../../components/jeecgbiz/JSelectFactory' |
| | | import { duplicateCheck } from '@/api/api' //é夿 ¡éª |
| | | |
| | | export default { |
| | | name: "WarehouseModal", |
| | | components: { |
| | | JDate, |
| | | JTreeDict, |
| | | JSelectFactory |
| | | }, |
| | | name: 'WarehouseModal', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | title: 'æä½', |
| | | visible: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | treeData: [], |
| | | warehouseId: "", //ä¿å线边åºid |
| | | warehouseId: '', //ä¿å线边åºid |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥çº¿è¾¹åºç¼å·' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | { validator: this.validateNum }, |
| | | { validator: this.validateNum } |
| | | ] |
| | | }, |
| | | warehouseName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥çº¿è¾¹åºåç§°' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateName }, |
| | | { validator: this.validateName } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | url: { |
| | | add: "/base/lineSideWarehouse/add", |
| | | edit: "/base/lineSideWarehouse/edit", |
| | | add: '/base/lineSideWarehouse/add', |
| | | edit: '/base/lineSideWarehouse/edit' |
| | | }, |
| | | nextFactoryOptions: [], |
| | | nextFactoryOptions: [] |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}); |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.warehouseId = record.id; |
| | | this.visible = true; |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | this.warehouseId = record.id |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'warehouseCode', 'warehouseName', 'factoryId') |
| | | ) |
| | | }); |
| | | }) |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add; |
| | | method = 'post'; |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit; |
| | | method = 'put'; |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | let formData = Object.assign(this.model, values) |
| | | httpAction(httpurl, formData, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | }) |
| | |
| | | fieldVal: value, |
| | | dataId: this.warehouseId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | delFlag: 'true' |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | callback() |
| | | } else { |
| | | callback("线边åºç¼å·å·²åå¨!"); |
| | | callback('线边åºç¼å·å·²åå¨!') |
| | | } |
| | | }) |
| | | }, |
| | |
| | | fieldVal: value, |
| | | dataId: this.warehouseId, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | delFlag: 'true' |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | callback() |
| | | } else { |
| | | callback("线边åºåç§°å·²åå¨!"); |
| | | callback('线边åºåç§°å·²åå¨!') |
| | | } |
| | | }) |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | 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() |
| | | } |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="8"> |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="8"> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('åå
·ä¿¡æ¯')">导åº</a-button> |
| | | <!-- 导å
¥ã导åºåè½ --> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('åå
·ä¿¡æ¯')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> --> |
| | | </a-upload> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="çç¹åå·"> |
| | | <a-input placeholder="请è¾å
¥çç¹åå·" v-model="queryParam.orderCode" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="çç¹ç¶æ"> |
| | | <a-input placeholder="请è¾å
¥çç¹ç¶æ" v-model="queryParam.orderStatus" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :md="6" :sm="8"> |
| | | <a-form-item label="çç¹äºº"> |
| | | <a-input placeholder="è¯·éæ©çç¹äºº" v-model="queryParam.operator" /> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="çç¹äºº"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©çç¹äºº" |
| | | v-model="queryParam.operator" |
| | | dict="sys_user,realname,id,del_flag=0" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å 餿 è®°', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | }, |
| | | // { |
| | | // title:'å 餿 è®°', |
| | | // align:"center", |
| | | // dataIndex: 'delFlag' |
| | | // }, |
| | | { |
| | | title:'çç¹åå·', |
| | | align:"center", |
| | |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | handleAdd(){ |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'int',value:'delFlag',text:'å 餿 è®°'}) |
| | |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <!-- 注éçæ¯del_flagé»è®¤æ¯0ä¸éè¦è¾å
¥ --> |
| | | <!-- <a-col :span="24"> |
| | | <a-form-model-item label="å 餿 è®°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag"> |
| | | <a-input-number v-model="model.delFlag" placeholder="请è¾å
¥å 餿 è®°" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="çç¹åå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> |
| | | <a-input v-model="model.orderCode" placeholder="请è¾å
¥çç¹åå·" ></a-input> |
| | |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="çç¹äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator"> |
| | | <a-input v-model="model.operator" placeholder="请è¾å
¥çç¹äºº" ></a-input> |
| | | <!-- <a-input v-model="model.operator" placeholder="请è¾å
¥çç¹äºº" ></a-input> --> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©çç¹äºº" |
| | | v-model="model.operator" |
| | | dict="sys_user,realname,id,del_flag=0" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
| | | export default { |
| | | name: 'ToolStocktakingForm', |
| | | components: { |
| | | JSearchSelectTag, |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.submitForm(); |
| | | this.loadData() |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="线边åºç©æä¿¡æ¯" |
| | | > |
| | | :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç©æç¼ç "> |
| | | <j-input placeholder="请è¾å
¥ç©æç¼ç " v-model="queryParam.materialNumber"></j-input> |
| | | </a-form-item> |
| | |
| | | <j-input placeholder="请è¾å
¥ç©æåç§°" v-model="queryParam.materialName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç©æåå·"> |
| | | <j-input placeholder="请è¾å
¥ç©æåå·" v-model="queryParam.materialModel"></j-input> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç¶æ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç¶æ" dictCode="dict_item_status" |
| | | v-model="queryParam.materialStatus"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç©æç±»å"> |
| | | <j-dict-select-tag placeholder="请è¾å
¥ç©æç±»å" dictCode="material_category" v-model="queryParam.materialCategory"></j-dict-select-tag> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç©æç±»å" dictCode="material_category" |
| | | v-model="queryParam.materialCategory"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-col :xl="2" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="空类å"> |
| | | <a-switch v-model="queryParam.materialCategoryNull"></a-switch> |
| | | </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="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> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢ç©æä¿¡æ¯-æµè¯</a-button>--> |
| | | <!-- <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢ç©æä¿¡æ¯-æµè¯</a-button>--> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <div> |
| | | <!-- 主表ååºå --> |
| | |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :rowClassName="tableRowClass" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys, |
| | | onChange: onSelectChange, |
| | | type: 'radio'}" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}" |
| | | @change="handleTableChange"> |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.materialStatus==='1'" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.materialStatus==='1'" |
| | | class="success" |
| | | >å¯ç¨</span> |
| | | <a-badge |
| | | v-if="record.materialStatus==='0'" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.materialStatus==='0'" |
| | | class="error" |
| | | >ç¦ç¨</span> |
| | | </span> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleEdit(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="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.materialStatus === '1'"> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç¦ç¨å?" |
| | | @confirm="() => handleActive(record)" |
| | | > |
| | | <a>ç¦ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-else> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="ç©æåºåä¿¡æ¯" :key="refKeys[0]" :forceRender="true"> |
| | | <a-tab-pane tab="åºåæç»" :key="refKeys[0]" :forceRender="true"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 10px;"> |
| | | <a-tag color="green" style="font-weight: bold;"> |
| | | åºåæ»éï¼{{ totalInventoryQuantity }} |
| | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LswMaterialModal from '@views/lsw/modules/LswMaterialModal.vue' |
| | |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title: 'ç©æåå·', |
| | | title: 'ç©æç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'materialModel' |
| | | scopedSlots: { |
| | | customRender: 'status' |
| | | }, |
| | | dataIndex: 'materialStatus' |
| | | }, |
| | | { |
| | | title: 'ç©æç±»å', |
| | |
| | | dataIndex: 'materialCategory_dictText' |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | title: 'åºæ¬è®¡éåä½', |
| | | align: 'center', |
| | | dataIndex: 'materialUnit' |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | // ç©æåºåä¿¡æ¯ |
| | |
| | | }, |
| | | url: { |
| | | //searchlikeQuery |
| | | list: '/lswmaterial/lswMaterial/list', |
| | | queryById: '/lswmaterial/lswMaterial/queryById', |
| | | list: '/lsw/lswMaterial/list', |
| | | edit: '/lsw/lswMaterial/edit', |
| | | active: '/lsw/lswMaterial/active', |
| | | inactive: '/lsw/lswMaterial/inactive', |
| | | queryById: '/lsw/lswMaterial/queryById', |
| | | lswMaterialInventory: { |
| | | list: '/lswmaterial/lswMaterial/queryLswMaterialInventoryByMainId' |
| | | list: '/lsw/lswMaterial/queryLswMaterialInventoryByMainId' |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | totalInventoryQuantity() { |
| | | if (!this.lswMaterialInventoryTable.dataSource || this.lswMaterialInventoryTable.dataSource.length === 0) { |
| | | return '0'; |
| | | return '0' |
| | | } |
| | | return this.lswMaterialInventoryTable.dataSource.reduce((sum, item) => { |
| | | const quantity = Number(item.quantity) || 0; |
| | | return sum + quantity; |
| | | }, 0); |
| | | const quantity = Number(item.quantity) || 0 |
| | | return sum + quantity |
| | | }, 0) |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | handleCustomAdd(){ |
| | | console.log('ç¹å»æ°å¢äº') |
| | | }, |
| | | handleTableChange() { |
| | | console.log('test---->', this.selectedRowKeys[0]) |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != '1') { |
| | | return 'frozenRowClass' |
| | | } |
| | | return '' |
| | | }, |
| | | async onSelectChange(selectedRowKeys) { |
| | | this.lswMaterialInventoryTable.loading = true |
| | | // å鿍¡å¼ä¸ï¼selectedRowKeys æ¯æ°ç»ï¼ä½é¿åº¦æå¤ä¸º1 |
| | | console.log('ç¹å»äº---->') |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.lswMaterialInventoryTable.dataSource=[] |
| | | this.lswMaterialInventoryTable.dataSource = [] |
| | | // è·åéä¸è¡ç宿´æ°æ® |
| | | if (selectedRowKeys.length > 0) { |
| | | const selectedId = selectedRowKeys[0] // éä¸è¡çid |
| | |
| | | this.lswMaterialInventoryTable.dataSource = lswMaterialInventoryResult.result |
| | | this.lswMaterialInventoryTable.loading = false |
| | | } |
| | | }, |
| | | handleActive(record) { |
| | | let url = this.url.active; |
| | | if (record.materialStatus === '1') { |
| | | url = this.url.inactive |
| | | } |
| | | let that = this |
| | | getAction(url, { id: record.id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <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> |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <j-form-container :disabled="true"> |
| | | <!-- 主表ååºå --> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-form-model ref="form1" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="12" > |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ç©æç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | | <a-input v-model="model.materialNumber"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ç©æåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> |
| | | <a-input v-model="model.materialName" placeholder="请è¾å
¥ç©æåç§°" ></a-input> |
| | | <a-input v-model="model.materialName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç©æåå·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialModel"> |
| | | <a-input v-model="model.materialModel" placeholder="请è¾å
¥ç©æåå·" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="ç©æç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCategory"> |
| | | <j-dict-select-tag type="list" v-model="model.materialCategory" dictCode="material_category" placeholder="è¯·éæ©ç©æç±»å" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12" > |
| | | <a-form-model-item label="åä½" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> |
| | | <a-input v-model="model.materialUnit" placeholder="请è¾å
¥åä½" ></a-input> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="åºæ¬è®¡éåä½" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> |
| | | <a-input v-model="model.materialUnit"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <!-- å表ååºå --> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="ç©æåºåä¿¡æ¯" :key="refKeys[0]" :forceRender="true"> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref="refKeys[0]" |
| | | :loading="lswMaterialInventoryTable.loading" |
| | | :columns="lswMaterialInventoryTable.columns" |
| | | :dataSource="lswMaterialInventoryTable.dataSource" |
| | | :maxHeight="300" |
| | | :disabled="formDisabled" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ç©æç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCategory"> |
| | | <j-dict-select-tag type="list" v-model="model.materialCategory" dictCode="material_category" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </j-form-container> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import { httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'LswMaterialForm', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer, |
| | | }, |
| | | data() { |
| | | return { |
| | | warehouseColOptions: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | model:{ |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 1, |
| | | refKeys: ['lswMaterialInventory', ], |
| | | tableKeys:['lswMaterialInventory', ], |
| | | activeKey: 'lswMaterialInventory', |
| | | // ç©æåºåä¿¡æ¯ |
| | | lswMaterialInventoryTable: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | | key: 'batchNumber', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'åºåç±»å', |
| | | key: 'inventoryCategory', |
| | | type: JVXETypes.select, |
| | | width:"200px", |
| | | placeholder: 'è¯·éæ©${title}', |
| | | defaultValue:'', |
| | | options:[], |
| | | dictCode: 'inventoryCategory' |
| | | }, |
| | | { |
| | | title: 'æ°é', |
| | | key: 'quantity', |
| | | type: JVXETypes.input, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'åºåå°', |
| | | key: 'warehouseId', |
| | | type: JVXETypes.select, |
| | | width: "200px", |
| | | options: this.warehouseColOptions, |
| | | }, |
| | | { |
| | | title: 'åºåç¶æ', |
| | | key: 'inventoryStatus', |
| | | type: JVXETypes.select, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | defaultValue:'', |
| | | options:[], |
| | | dictCode: 'inventory_status' |
| | | }, |
| | | ] |
| | | }, |
| | | validatorRules: { |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialModel: [ |
| | | { required: true, message: 'ç©æåå·æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialCategory: [ |
| | | { required: true, message: 'ç©æç±»åæ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialUnit: [ |
| | | { required: true, message: 'å使¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | }, |
| | | url: { |
| | | add: "/lswmaterial/lswMaterial/add", |
| | | edit: "/lswmaterial/lswMaterial/edit", |
| | | queryById: "/lswmaterial/lswMaterial/queryById", |
| | | warehouseList:"/base/lineSideWarehouse/list", |
| | | lswMaterialInventory: { |
| | | list: '/lswmaterial/lswMaterial/queryLswMaterialInventoryByMainId' |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | export default { |
| | | name: 'LswMaterialForm', |
| | | components: { |
| | | }, |
| | | data() { |
| | | return { |
| | | confirmLoading: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | model: {}, |
| | | validatorRules: { |
| | | materialCategory: [ |
| | | { required: true, message: 'ç©æç±»åå¿
é', trigger: 'change' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '', |
| | | edit: '/lsw/lswMaterial/edit' |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | console.log('formDisabled' + this.formDisabled) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | created () { |
| | | this.loadWarehouseOptions(); |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | methods: { |
| | | async loadWarehouseOptions() { |
| | | try { |
| | | const res = await getAction(this.url.warehouseList); |
| | | console.log("ä»åºAPIååº:", res); |
| | | let data = []; |
| | | data = res.result.records; |
| | | console.log("å¤çåçä»åºæ°æ®:", data); |
| | | const options = data.map(item => ({ |
| | | text: item.warehouseName || `ä»åº(${item.id})`, // æ¾ç¤ºææ¬ |
| | | value: item.id // å®é
å¼ |
| | | })); |
| | | console.log("æ ¼å¼ååçé项:", options); |
| | | const warehouseCol = this.lswMaterialInventoryTable.columns.find( |
| | | col => col.key === 'warehouseId' |
| | | ); |
| | | if (warehouseCol) { |
| | | this.$set(warehouseCol, 'options', options); |
| | | this.warehouseColOptions = warehouseCol.options |
| | | console.log("æ´æ°åçåé项:", warehouseCol.options); |
| | | submitForm() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$forceUpdate(); |
| | | console.log("å·²å¼ºå¶æ´æ°è§å¾"); |
| | | }); |
| | | } catch (error) { |
| | | console.error('å è½½ä»åºå表失败:', error); |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | addBefore(){ |
| | | this.lswMaterialInventoryTable.dataSource=[] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.lswMaterialInventory.list, params, this.lswMaterialInventoryTable) |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues){ |
| | | return new Promise((resolve,reject)=>{ |
| | | Promise.all([ |
| | | ]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | return { |
| | | ...main, // å±å¼ |
| | | lswMaterialInventoryList: allValues.tablesValue[0].tableData, |
| | | } |
| | | }, |
| | | validateError(msg){ |
| | | this.$message.error(msg) |
| | | }, |
| | | |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="1200" |
| | | :width="800" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | switchFullscreen |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import LswMaterialForm from './LswMaterialForm' |
| | | |
| | | export default { |
| | |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.handleOk(); |
| | | this.$refs.realForm.submitForm(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED' || record.workOrderStatus === 'EXECUTING'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleRePublish(record)">éåå¸</a> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED'"> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®å¼å§æ§è¡å?" @confirm="() => handleExecute(record.id)"> |
| | | <a>æ§è¡</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'EXECUTING'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleWorkReport(record)">æ¥å·¥</a> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'NEW'"> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®åå¸å?" @confirm="() => handlePublish(record.id)"> |
| | | <a>åå¸</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" /> |
| | | <span v-if="record.workOrderStatus === 'NEW'"> |
| | | <a-popconfirm title="ç¡®å®åå¸å?" @confirm="() => handlePublish(record.id)"> |
| | | <a>åå¸</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED' || record.workOrderStatus === 'EXECUTING'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleRePublish(record)">éåå¸</a> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED' && record.completenessCheckFlag === '0'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleCompletenessCheck(record)">é½å¥æ§æ£æ¥</a> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED' && record.equipmentInspectionFlag === '0'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleCompletenessCheck(record)">设å¤ç¹æ£</a> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED' && record.processInspectionFlag === '0'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleCompletenessCheck(record)">å·¥èºç¹æ£</a> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'PUBLISHED' && record.completenessCheckFlag === '1' && record.equipmentInspectionFlag === '1' && record.processInspectionFlag === '1'"> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®å¼å§æ§è¡å?" @confirm="() => handleExecute(record.id)"> |
| | | <a>æ§è¡</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | <span v-if="record.workOrderStatus === 'EXECUTING'"> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleWorkReport(record)">æ¥å·¥</a> |
| | | </span> |
| | | <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="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.workOrderStatus === 'NEW'"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-menu-item v-if="record.workOrderStatus === 'NEW'"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </span> |
| | | </a-table> |
| | |
| | | <mes-production-order-modal ref="MesProductionOrderModal"></mes-production-order-modal> |
| | | <MesMaterialUnloadingList ref="MesMaterialUnloadingList"></MesMaterialUnloadingList> |
| | | <MesMaterialTransferDetailList ref="MesMaterialTransferDetailList"></MesMaterialTransferDetailList> |
| | | <MesProductionWorkOrderScheduleModal ref="MesProductionWorkOrderScheduleModal"></MesProductionWorkOrderScheduleModal> |
| | | <MesProductionWorkOrderScheduleModal ref="MesProductionWorkOrderScheduleModal" @ok="modalFormOk"></MesProductionWorkOrderScheduleModal> |
| | | <MesProductionWorkOrderRepublishModal ref="MesProductionWorkOrderRepublishModal" @ok="modalFormOk"></MesProductionWorkOrderRepublishModal> |
| | | <MesProductionWorkOrderReportModal ref="MesProductionWorkOrderReportModal" @ok="modalFormOk"></MesProductionWorkOrderReportModal> |
| | | <MesProductionWorkOrderCompletenessCheckModal ref="MesProductionWorkOrderCompletenessCheckModal" @ok="modalFormOk"></MesProductionWorkOrderCompletenessCheckModal> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import MesProductionWorkOrderScheduleModal from '@views/mes/modules/MesProductionWorkOrderScheduleModal.vue' |
| | | import MesProductionWorkOrderRepublishModal from '@views/mes/modules/MesProductionWorkOrderRepublishModal.vue' |
| | | import MesProductionWorkOrderReportModal from '@views/mes/modules/MesProductionWorkOrderReportModal.vue' |
| | | import MesProductionWorkOrderCompletenessCheckModal from '@views/mes/modules/MesProductionWorkOrderCompletenessCheckModal.vue' |
| | | |
| | | export default { |
| | | name: 'MesProductionWorkOrderList', |
| | |
| | | MesProductionWorkOrderScheduleModal, |
| | | MesProductionWorkOrderRepublishModal, |
| | | MesProductionWorkOrderReportModal, |
| | | MesProductionWorkOrderCompletenessCheckModal |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | handleWorkReport(record) { |
| | | this.$refs.MesProductionWorkOrderReportModal.add(record) |
| | | }, |
| | | handleCompletenessCheck(record) { |
| | | this.$refs.MesProductionWorkOrderCompletenessCheckModal.check(record) |
| | | }, |
| | | async handleTransferDetail(row){ |
| | | console.log('row---->',row) |
| | | const transferDetailResult = await getAction(this.url.queryTransferDetailBy,{'requestId':row.id}) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | bordered |
| | | rowKey="" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="false" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap"> |
| | | |
| | | <template slot="checkFlag" slot-scope="text, record"> |
| | | <span v-if="text === '0'" style="color: red">å¦</span> |
| | | <span v-if="text === '1'" style="color: green">æ¯</span> |
| | | </template> |
| | | </a-table> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { postAction, getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'MesProductionWorkOrderReportModal', |
| | | data () { |
| | | return { |
| | | title: 'é½å¥æ§æ£æ¥', |
| | | width: 800, |
| | | visible: false, |
| | | loading: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | validatorRules: { |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'ç©æç¼å·', |
| | | align:"center", |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title:'ç©æåç§°', |
| | | align:"center", |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'éæ±æ°é', |
| | | align:"center", |
| | | dataIndex: 'requiredQuantity' |
| | | }, |
| | | { |
| | | title:'å®é
æ°é', |
| | | align:"center", |
| | | dataIndex: 'actualQuantity' |
| | | }, |
| | | { |
| | | title:'åºæ¬åä½', |
| | | align:"center", |
| | | dataIndex: 'productionUnit' |
| | | }, |
| | | { |
| | | title:'æ¯å¦é½å¤', |
| | | align:"center", |
| | | dataIndex: 'checkFlag', |
| | | scopedSlots: { customRender: 'checkFlag' } |
| | | }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | report: '/mesworkreporting/mesWorkReporting/add', |
| | | selectReportWorkOrderList: '/mes/productionOrder/selectReportWorkOrderList', |
| | | workOrderCompletenessCheck: '/mesproductionworkorder/mesProductionWorkOrder/workOrderCompletenessCheck', |
| | | add: '/meskittingcompletenesscheck/mesKittingCompletenessCheck/addBatch' |
| | | }, |
| | | workOrderOptions: [] |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | methods: { |
| | | check (record) { |
| | | this.loading = true |
| | | getAction(this.url.workOrderCompletenessCheck, {id: record.id}).then(res => { |
| | | if (res.success) { |
| | | res.result.map(item => item.workOrderId = record.id) |
| | | this.dataSource = res.result |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | this.visible = true |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | postAction(this.url.add, this.dataSource).then(res => { |
| | | if (res.success) { |
| | | this.$message.success('æ£æ¥ç»æå·²ä¿å') |
| | | this.submitCallback() |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | import { postAction, getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'MesProductionWorkOrderRepublishModal', |
| | | name: 'MesProductionWorkOrderReportModal', |
| | | data () { |
| | | return { |
| | | title: 'æ¥å·¥', |
| | |
| | | sm: { span: 18 }, |
| | | }, |
| | | url: { |
| | | republish: '/mesproductionworkorder/mesProductionWorkOrder/republish', |
| | | report: '/mesworkreporting/mesWorkReporting/add', |
| | | selectReportWorkOrderList: '/mes/productionOrder/selectReportWorkOrderList' |
| | | }, |
| | | workOrderOptions: [] |
| | |
| | | if (valid) { |
| | | this.confirmLoading = true |
| | | let formData = { |
| | | id: this.model.id, |
| | | planQuantity: this.model.planQuantity, |
| | | republishReason: this.model.republishReason |
| | | orderId: this.model.orderId, |
| | | workOrderId: this.model.id, |
| | | factoryId: this.model.factoryId, |
| | | quantity: this.model.quantity |
| | | } |
| | | postAction(this.url.republish, formData).then(res => { |
| | | postAction(this.url.report, formData).then(res => { |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | this.submitCallback() |
| | |
| | | <a-row :gutter="12"> |
| | | <a-col :md="7" :sm="8"> |
| | | <a-form-item label="åå
¸åç§°" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}"> |
| | | <a-input placeholder="请è¾å
¥åå
¸åç§°" v-model="queryParam.dictName"></a-input> |
| | | <j-input placeholder="请è¾å
¥åå
¸åç§°" v-model="queryParam.dictName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="7" :sm="8"> |
| | | <a-form-item label="åå
¸ç¼å·" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}"> |
| | | <a-input placeholder="请è¾å
¥åå
¸ç¼å·" v-model="queryParam.dictCode"></a-input> |
| | | <j-input placeholder="请è¾å
¥åå
¸ç¼å·" v-model="queryParam.dictCode"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="7" :sm="8"> |
| | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | size="small" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns1" |
| | |
| | | methods: { |
| | | add() { |
| | | this.model = {}; |
| | | this.model.seqLength = 4; |
| | | // this.model.seqLength = 4; |
| | | this.editable = false; |
| | | this.visible = true |
| | | }, |