| | |
| | | deleteBatch: "/cms/cuttingReceiveDetail/deleteBatch", |
| | | exportXlsUrl: "/cms/cuttingReceiveDetail/exportXls", |
| | | importExcelUrl: "cms/cuttingReceiveDetail/importExcel", |
| | | |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'orderId',text:'é¢ç¨åID'}) |
| | | fieldList.push({type:'string',value:'cuttingId',text:'åå
·ID'}) |
| | | fieldList.push({type:'string',value:'cuttingCode',text:'åå
·ç¼ç '}) // æ·»å è¿ä¸è¡ |
| | | fieldList.push({type:'string',value:'cuttingName',text:'åå
·åç§°'}) // æ·»å è¿ä¸è¡ |
| | | fieldList.push({type:'string',value:'inventoryId',text:'åºåID'}) |
| | | fieldList.push({type:'string',value:'workpieceMaterial',text:'工件æè´¨'}) |
| | | fieldList.push({type:'int',value:'usedLife',text:'使ç¨å¯¿å½'}) |
| | |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="é¢ç¨åç¶æ"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©é¢ç¨åç¶æ" |
| | | v-model="queryParam.orderStatus" |
| | | dict="order_status" |
| | | /> |
| | | placeholder="è¯·éæ©é¢ç¨åç¶æ" |
| | | v-model="queryParam.orderStatus" |
| | | dict="order_status" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="é¢ç¨äºº"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©é¢ç¨äºº" |
| | | v-model="queryParam.receiver" |
| | | dict="sys_user,realname,id,del_flag!=1" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | <a-form-item label="é¢ç¨äºº"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©é¢ç¨äºº" |
| | | v-model="queryParam.receiver" |
| | | dict="sys_user,realname,id,del_flag!=1" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" /> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | |
| | | |
| | | </a-table> |
| | | </div> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="åå
·é¢ç¨æç»" key="1"> |
| | | <cutting-receive-detail-list ref="cuttingReceiveDetailList"></cutting-receive-detail-list> |
| | | </a-tab-pane> |
| | |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import CuttingReceiveModal from './modules/CuttingReceiveModal' |
| | | import CuttingReceiveDetailList from './CuttingReceiveDetailList' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import CuttingReceiveModal from './modules/CuttingReceiveModal' |
| | | import CuttingReceiveDetailList from './CuttingReceiveDetailList' |
| | | |
| | | export default { |
| | | name: 'CuttingReceiveList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | CuttingReceiveModal, |
| | | CuttingReceiveDetailList |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'åå
·é¢ç¨å管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'é¢ç¨äºº', |
| | | align:"center", |
| | | dataIndex: 'receiver_dictText' |
| | | }, |
| | | { |
| | | title:'é¢ç¨æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'receiveTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'é¢ç¨è¯´æ', |
| | | align:"center", |
| | | dataIndex: 'receiveComment' |
| | | }, |
| | | { |
| | | title:'确认人', |
| | | align:"center", |
| | | dataIndex: 'confirmer_dictText' |
| | | }, |
| | | { |
| | | title:'确认æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'confirmTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'确认æè§', |
| | | align:"center", |
| | | dataIndex: 'confirmComment' |
| | | }, |
| | | { |
| | | title:'æ¯å¦ä¼å½è¿', |
| | | align:"center", |
| | | dataIndex: 'returnFlag' |
| | | }, |
| | | { |
| | | title:'å½è¿æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'returnTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'å½è¿è¯´æ', |
| | | align:"center", |
| | | dataIndex: 'returnComment' |
| | | }, |
| | | { |
| | | title:'å½è¿ç¡®è®¤äºº', |
| | | align:"center", |
| | | dataIndex: 'returnConfirmer_dictText' |
| | | }, |
| | | { |
| | | title:'å½è¿ç¡®è®¤æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'returnConfirmTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'å½è¿ç¡®è®¤æè§', |
| | | align:"center", |
| | | dataIndex: 'returnConfirmComment' |
| | | }, |
| | | { |
| | | title:'é¢ç¨åç¶æ', |
| | | align:"center", |
| | | dataIndex: 'orderStatus' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | export default { |
| | | name: 'CuttingReceiveList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | CuttingReceiveModal, |
| | | CuttingReceiveDetailList |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'åå
·é¢ç¨å管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/cms/cuttingReceive/list", |
| | | delete: "/cms/cuttingReceive/delete", |
| | | deleteBatch: "/cms/cuttingReceive/deleteBatch", |
| | | exportXlsUrl: "/cms/cuttingReceive/exportXls", |
| | | importExcelUrl: "cms/cuttingReceive/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | { |
| | | title: 'é¢ç¨äºº', |
| | | align: 'center', |
| | | dataIndex: 'receiver_dictText' |
| | | }, |
| | | { |
| | | title: 'é¢ç¨æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'receiveTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'é¢ç¨è¯´æ', |
| | | align: 'center', |
| | | dataIndex: 'receiveComment' |
| | | }, |
| | | { |
| | | title: '确认人', |
| | | align: 'center', |
| | | dataIndex: 'confirmer_dictText' |
| | | }, |
| | | { |
| | | title: '确认æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: '确认æè§', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment' |
| | | }, |
| | | { |
| | | title: 'æ¯å¦ä¼å½è¿', |
| | | align: 'center', |
| | | dataIndex: 'returnFlag' |
| | | }, |
| | | { |
| | | title: 'å½è¿æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'returnTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'å½è¿è¯´æ', |
| | | align: 'center', |
| | | dataIndex: 'returnComment' |
| | | }, |
| | | { |
| | | title: 'å½è¿ç¡®è®¤äºº', |
| | | align: 'center', |
| | | dataIndex: 'returnConfirmer_dictText' |
| | | }, |
| | | { |
| | | title: 'å½è¿ç¡®è®¤æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'returnConfirmTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'å½è¿ç¡®è®¤æè§', |
| | | align: 'center', |
| | | dataIndex: 'returnConfirmComment' |
| | | }, |
| | | { |
| | | title: 'é¢ç¨åç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'orderStatus' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/cms/cuttingReceive/list', |
| | | delete: '/cms/cuttingReceive/delete', |
| | | deleteBatch: '/cms/cuttingReceive/deleteBatch', |
| | | exportXlsUrl: '/cms/cuttingReceive/exportXls', |
| | | importExcelUrl: 'cms/cuttingReceive/importExcel' |
| | | |
| | | }, |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList() |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.$refs.cuttingReceiveDetailList.dataSource = [] |
| | | this.loadData(1); |
| | | this.loadData(1) |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | handleEdit: function(record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | handleAdd() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | handleDetail:function(record){ |
| | | this.$refs.modalForm.edit(record); |
| | | this.$refs.modalForm.title="详æ
"; |
| | | this.$refs.modalForm.disableSubmit = true; |
| | | handleDetail: function(record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = '详æ
' |
| | | this.$refs.modalForm.disableSubmit = true |
| | | }, |
| | | customRow(record) { |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | |
| | | for (let i = 0; i < children.length; i++) { |
| | | children[i].classList.add('checked-td-of-add-table') |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="é¢ç¨äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-search-select-tag |
| | | :disabled="disableSubmit" |
| | |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="é¢ç¨è¯´æ" :labelCol="{span:3}" :wrapperCol="{span:21}"> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥é¢ç¨è¯´æ" v-decorator="['receiveComment', validatorRules.receiveComment]" /> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥é¢ç¨è¯´æ" |
| | | v-decorator="['receiveComment', validatorRules.receiveComment]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="确认人" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-search-select-tag |
| | | :disabled="disableSubmit" |
| | |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="确认æè§" :labelCol="{span:3}" :wrapperCol="{span:21}"> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥ç¡®è®¤æè§" v-decorator="['confirmComment', validatorRules.confirmComment]" /> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥ç¡®è®¤æè§" |
| | | v-decorator="['confirmComment', validatorRules.confirmComment]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="æ¯å¦ä¼å½è¿" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" placeholder="请è¾å
¥æ¯å¦ä¼å½è¿" v-decorator="['returnFlag', validatorRules.returnFlag]" ></a-input> |
| | | <a-input :disabled="disableSubmit" placeholder="请è¾å
¥æ¯å¦ä¼å½è¿" |
| | | v-decorator="['returnFlag', validatorRules.returnFlag]"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24 / 2"> |
| | |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="å½è¿è¯´æ" :labelCol="{span:3}" :wrapperCol="{span:21}"> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å½è¿è¯´æ" v-decorator="['returnComment', validatorRules.returnComment]" /> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å½è¿è¯´æ" |
| | | v-decorator="['returnComment', validatorRules.returnComment]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="å½è¿ç¡®è®¤äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-search-select-tag |
| | | :disabled="disableSubmit" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="å½è¿ç¡®è®¤æè§" :labelCol="{span:3}" :wrapperCol="{span:21}"> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å½è¿ç¡®è®¤æè§" v-decorator="['returnConfirmComment', validatorRules.returnConfirmComment]" /> |
| | | <a-textarea :disabled="disableSubmit" placeholder="请è¾å
¥å½è¿ç¡®è®¤æè§" |
| | | v-decorator="['returnConfirmComment', validatorRules.returnConfirmComment]" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTooling()" |
| | | >éæ©åå
·</a-button |
| | | > |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTooling()">éæ©åå
·</a-button> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | > |
| | | <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> |
| | | <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index" > |
| | | <div :key="col.dataIndex"> |
| | | <a-input |
| | | :value="text" |
| | | :disabled="disableSubmit" |
| | | v-if="col.dataIndex == 'workpieceMaterial'" |
| | | @change="(e)=>handleChange(e.target.value, record.key, col, index)" |
| | | /> |
| | | <a-input-number |
| | | v-if="col.dataIndex == 'usedLife'" |
| | | <a-input |
| | | :value="text" |
| | | :disabled="disableSubmit" |
| | | v-if="col.dataIndex === 'workpieceMaterial'" |
| | | @change="(e)=>handleChange(e.target.value, record.key, col, index)" |
| | | /> |
| | | <a-input-number |
| | | v-if="col.dataIndex === 'usedLife'" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :min="1" |
| | |
| | | <template slot="footer" v-if="disableSubmit == true"> |
| | | <a-button :style="{ marginRight: '8px' }" @click="handleCancel">å
³é</a-button> |
| | | </template> |
| | | <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk"></j-select-tooling-modal> |
| | | <j-select-inventory-modal ref="inventoryModalForm" @ok="modalFormOk"></j-select-inventory-modal> |
| | | <!-- <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk"></j-select-tooling-modal>--> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import pick from 'lodash.pick' |
| | | import JSelectToolingModal from './JSelectToolingModal' |
| | | import moment from 'moment' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import { filterObj } from '@/utils/util' |
| | | import store from '@/store/' |
| | | export default { |
| | | name: 'CuttingInboundModal', |
| | | components: { |
| | | import pick from 'lodash.pick' |
| | | import JSelectToolingModal from './JSelectToolingModal' |
| | | import moment from 'moment' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import { filterObj } from '@/utils/util' |
| | | import store from '@/store/' |
| | | import JSelectInventoryModal from '@views/cms/modules/JSelectInventoryModal.vue' |
| | | |
| | | export default { |
| | | name: 'CuttingInboundModal', |
| | | components: { |
| | | JSelectToolingModal, |
| | | JSelectInventoryModal, |
| | | JMultiSelectTag, |
| | | JDictSelectTag, |
| | | store, |
| | | moment, |
| | | moment |
| | | }, |
| | | data () { |
| | | return { |
| | | /* å页忰 */ |
| | | data() { |
| | | return { |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | total: 0 |
| | | }, |
| | | title:'æ°å¢', |
| | | visible: false, |
| | | selectedRowKeys: {}, |
| | | title: 'æ°å¢', |
| | | visible: false, |
| | | selectedRowKeys: {}, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | sm: { span: 18 } |
| | | }, |
| | | confirmLoading: false, |
| | | loading: false, |
| | | form: this.$form.createForm(this), |
| | | dataSource: [], |
| | | param: {}, |
| | | validatorRules: { |
| | | }, |
| | | validatorRules: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: 'åå
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'cuttingCode', |
| | | width: 150, |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: 'åå
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'cuttingName', |
| | | dataIndex: 'cuttingName' |
| | | }, |
| | | { |
| | | title: '工件æè´¨', |
| | | align: 'center', |
| | | dataIndex: 'workpieceMaterial', |
| | | scopedSlots: { customRender: 'workpieceMaterial' }, |
| | | |
| | | scopedSlots: { customRender: 'workpieceMaterial' } |
| | | }, |
| | | { |
| | | title: '使ç¨å¯¿å½', |
| | | align: 'center', |
| | | dataIndex: 'usedLife', |
| | | scopedSlots: { customRender: 'usedLife' }, |
| | | scopedSlots: { customRender: 'usedLife' } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | add: '/cms/cuttingReceive/add', |
| | | detailList: '/cms/cuttingReceive/detailList', |
| | | detailList: '/cms/cuttingReceive/detailList' |
| | | }, |
| | | orderId:'', |
| | | disableSubmit:false |
| | | } |
| | | }, |
| | | methods: { |
| | | modalFormOk(){ |
| | | orderId: '', |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods: { |
| | | modalFormOk() { |
| | | |
| | | }, |
| | | getQueryParams() { |
| | | }, |
| | | getQueryParams() { |
| | | this.param.pageNo = this.ipagination.current |
| | | this.param.pageSize = this.ipagination.pageSize |
| | | return filterObj(this.param) |
| | | }, |
| | | add() { |
| | | add() { |
| | | let receiver = store.getters.userInfo.id |
| | | let receiveTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') |
| | | this.edit({ receiver: receiver, receiveTime: receiveTime }) |
| | |
| | | ) |
| | | }) |
| | | }, |
| | | handleDelete(record, index) { |
| | | handleDelete(record, index) { |
| | | this.dataSource.splice(index, 1) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | selectTooling: function () { |
| | | selectTooling: function() { |
| | | let ids = [] |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].cuttingId) |
| | | ids.push(this.dataSource[i].inventoryId) |
| | | console.log('å½åæ°æ®æº:', this.dataSource) |
| | | } |
| | | this.$refs.toolingModalForm.showModal(ids) |
| | | this.$refs.toolingModalForm.title = 'éæ©åå
·' |
| | | this.$refs.toolingModalForm.disableSubmit = false |
| | | // this.$refs.toolingModalForm.showModal(ids) |
| | | // this.$refs.toolingModalForm.title = 'éæ©åå
·' |
| | | // this.$refs.toolingModalForm.disableSubmit = false |
| | | |
| | | this.$refs.inventoryModalForm.showModal(ids) |
| | | this.$refs.inventoryModalForm.title = 'éæ©åå
·' |
| | | this.$refs.inventoryModalForm.disableSubmit = false |
| | | |
| | | }, |
| | | detailList(orderId) { |
| | | this.param.orderId = orderId |
| | |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.detailData = this.dataSource |
| | | postAction(that.url.add, formData) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success('é¢ç¨æå') |
| | | that.$emit('ok', new Date()) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | |
| | | // æ·»å æ´æ°åºåç¶æçé»è¾ |
| | | const inventoryIds = this.dataSource.map(item => item.inventoryId) |
| | | const updateInventoryStatus = inventoryIds.length > 0 ? |
| | | //éè¦åä¸ä¸ªæ´æ°åºåç¶æçæ¥å£å¨å端ï¼è¿æ²¡å25/9/9ï¼ |
| | | postAction('/cms/inventory/updateStatus', { |
| | | ids: inventoryIds, |
| | | status: 'å¾
åºåº' //设为å¾
åºåº |
| | | }) : Promise.resolve() |
| | | updateInventoryStatus.then(() => { |
| | | return postAction(that.url.add, formData) |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success('é¢ç¨æå') |
| | | that.$emit('ok', new Date()) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).catch((error) => { |
| | | that.$message.error('æä½å¤±è´¥: ' + error.message) |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.dataSource = [] |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | }, |
| | | }, |
| | | mounted() { |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('selectionRows', (data) => { |
| | | console.log('æ¥æ¶å°çéæ©æ°æ®:', data) |
| | | //getCurrSelected äºä»¶ æ¥æ¶ç»ä»¶ä¼ éçåæ° |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.dataSource.push({ |
| | | cuttingId: data[i].id, |
| | | inventoryId: data[i].id, |
| | | cuttingCode: data[i].cuttingCode, |
| | | cuttingName: data[i].cuttingName |
| | | cuttingName: data[i].cuttingName, |
| | | cuttingId: data[i].cuttingId |
| | | }) |
| | | } |
| | | console.log('æ´æ°åçæ°æ®æº:', this.dataSource) |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <!--éæ©åå
·çå¼¹çªï¼æ ¹æ®è¿ä¸ªå¼¹çªå°éæ©åå
·ä»åå
·ä¿¡æ¯è¿ç§»å°åå
·åºåï¼ç¨æ¥é¢ç¨åå
·åºåéçåå
· --> |
| | | <j-modal |
| | | :visible="visible" |
| | | :title="title" |
| | | switchFullscreen |
| | | :width="1200" |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top: 50px" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-card :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-form-item label="åå
·ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥åå
·ç¼ç ,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.cuttingCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åå
·åç§°"> |
| | | <a-input placeholder="请è¾å
¥åå
·åç§°,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.cuttingName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <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-row> |
| | | </a-form> |
| | | </div> |
| | | <!--åå
·å表--> |
| | | <a-table |
| | | ref="table" |
| | | :scroll="scrollTrigger" |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'JSelectInventoryModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'åå
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'cuttingCode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'åå
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'cuttingName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'åå
·åç±»', |
| | | align: 'center', |
| | | dataIndex: 'cuttingCategory', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title:'åå
·æ¡ç ', |
| | | align: 'center', |
| | | dataIndex: 'cuttingBarcode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title:'åå
·å½å寿å½ï¼ç¾åæ¯ï¼', |
| | | align: 'center', |
| | | dataIndex: 'currentLife', |
| | | sorter: true, |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSlelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'æ ¹æ®æ¥è¯¢ç»æéæ©åå
·', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'desc', |
| | | }, |
| | | departTree: [], |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | // list: '/cms/cuttingTool/getCuttingToolList', |
| | | list:'/cms/cuttingReceive/getInventoryToolList' |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: (record) => ({ |
| | | props: { |
| | | disabled: record.distable, |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | } |
| | | }, |
| | | }, |
| | | watch: {}, |
| | | created() {}, |
| | | methods: { |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | showModal(oldSlelectRows) { |
| | | this.oldSlelectRows = oldSlelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | this.$bus.$emit('selectionRows', this.selectionRows) |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | onSearch() { |
| | | this.loadData(1) |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | // searchReset() { |
| | | // this.queryParam = {} |
| | | // this.loadData(1) |
| | | // }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd('HEAT_TREATMENT_INBOUND')" type="primary" icon="plus">çå¤çå¤åå
¥åº</a-button> |
| | | <a-button @click="handleAdd('SMALL_INNER_RING')" type="primary" icon="plus">å°å
åå¤åå
¥åº</a-button> |
| | | <a-button @click="handleAdd('HEAT_TREATMENT_INBOUND')" type="primary" icon="plus">çå¤çå¤åå
¥åº</a-button> |
| | | <a-button @click="handleAdd('SMALL_INNER_RING')" type="primary" icon="plus">å°å
åå¤åå
¥åº</a-button> |
| | | <a-button @click="handleAdd('MATERIAL_INNER_TRANSFER')" type="primary" icon="plus">å
é¨è°æ¨</a-button> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | |
| | | <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-form-item label="产线"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©äº§çº¿" v-model="queryParam.factoryId" |
| | | dictCode="base_factory,factory_name,id,del_flag=0 and factory_category='3'"></j-dict-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç±»å"> |
| | | <j-search-select-tag placeholder="è¯·éæ©ç±»å" v-model="queryParam.category" :dict-options="categoryDictOptions"></j-search-select-tag> |
| | | </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.materialNumber"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç©æåç§°"> |
| | | <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.batchNumber"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :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> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">䏿</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @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> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | <span slot="categorySlot" slot-scope="text, record"> |
| | | <a-tag color="orange" v-if="record.category === 'LOADING'">䏿</a-tag> |
| | | <a-tag color="blue" v-else-if="record.category === 'UNLOADING'">䏿</a-tag> |
| | | </span> |
| | | |
| | | <span slot="unloadingFlagSlot" slot-scope="text, record"> |
| | | <a-tag color="green" v-if="record.unloadingFlag === '0'">æ£å¸¸</a-tag> |
| | | <a-tag color="red" v-else-if="record.unloadingFlag === '1'">已䏿</a-tag> |
| | | </span> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">䏿</a> |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MesMaterialLoadingModal from './modules/MesMaterialLoadingModal' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MesMaterialLoadingModal from './modules/MesMaterialLoadingModal' |
| | | |
| | | export default { |
| | | name: 'MesMaterialLoadingList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | MesMaterialLoadingModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'ä¸æç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å 餿 è®°', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | }, |
| | | { |
| | | title:'å·¥åID', |
| | | align:"center", |
| | | dataIndex: 'workOrderId' |
| | | }, |
| | | { |
| | | title:'设å¤ID', |
| | | align:"center", |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title:'å·¥åºç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'processCode' |
| | | }, |
| | | { |
| | | title:'å·¥åºåç§°', |
| | | align:"center", |
| | | dataIndex: 'processName' |
| | | }, |
| | | { |
| | | title:'ç©æç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title:'ç©æåç§°', |
| | | align:"center", |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'æ¹æ¬¡å·', |
| | | align:"center", |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title:'æ°é', |
| | | align:"center", |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'å©ä½æ°é', |
| | | align:"center", |
| | | dataIndex: 'remainingQuantity' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/mes/mesMaterialLoading/list", |
| | | delete: "/mes/mesMaterialLoading/delete", |
| | | deleteBatch: "/mes/mesMaterialLoading/deleteBatch", |
| | | exportXlsUrl: "/mes/mesMaterialLoading/exportXls", |
| | | importExcelUrl: "mes/mesMaterialLoading/importExcel", |
| | | |
| | | export default { |
| | | name: 'MesMaterialLoadingList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | MesMaterialLoadingModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ä¸æç®¡ç页é¢', |
| | | categoryDictOptions: [ |
| | | { |
| | | value: 'LOADING', |
| | | text: '䏿' |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'int',value:'delFlag',text:'å 餿 è®°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'workOrderId',text:'å·¥åID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentId',text:'设å¤ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'processCode',text:'å·¥åºç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'processName',text:'å·¥åºåç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialNumber',text:'ç©æç¼ç ',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialName',text:'ç©æåç§°',dictCode:''}) |
| | | fieldList.push({type:'string',value:'batchNumber',text:'æ¹æ¬¡å·',dictCode:''}) |
| | | fieldList.push({type:'double',value:'quantity',text:'æ°é',dictCode:''}) |
| | | fieldList.push({type:'double',value:'remainingQuantity',text:'å©ä½æ°é',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | { |
| | | value: 'UNLOADING', |
| | | text: '䏿' |
| | | }, |
| | | ], |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '产线', |
| | | align: 'center', |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | | { |
| | | title: '线边åº', |
| | | align: 'center', |
| | | dataIndex: 'warehouseId_dictText' |
| | | }, |
| | | { |
| | | title: 'ç©æç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title: 'ç©æåç§°', |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | | align: 'center', |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title: 'æ°é', |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title: 'å©ä½æ°é', |
| | | align: 'center', |
| | | dataIndex: 'remainingQuantity' |
| | | }, |
| | | { |
| | | title: 'é¢ç尺寸', |
| | | align: 'center', |
| | | dataIndex: 'steelBallSize_dictText' |
| | | }, |
| | | { |
| | | title: 'ç±»å', |
| | | align: 'center', |
| | | dataIndex: 'category', |
| | | scopedSlots: { |
| | | customRender: 'categorySlot' |
| | | }, |
| | | }, |
| | | { |
| | | title: '䏿æ è®°', |
| | | align: 'center', |
| | | dataIndex: 'unloadingFlag', |
| | | scopedSlots: { |
| | | customRender: 'unloadingFlagSlot' |
| | | }, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/mes/mesMaterialLoading/list' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <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 :span="12"> |
| | | <a-form-model-item label="å·¥åID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderId"> |
| | | <a-input v-model="model.workOrderId" placeholder="请è¾å
¥å·¥åID" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> |
| | | <a-input v-model="model.equipmentId" placeholder="请è¾å
¥è®¾å¤ID" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥åºç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processCode"> |
| | | <a-input v-model="model.processCode" placeholder="请è¾å
¥å·¥åºç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å·¥åºåç§°" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processName"> |
| | | <a-input v-model="model.processName" placeholder="请è¾å
¥å·¥åºåç§°" ></a-input> |
| | | <a-form-model-item label="产线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId"> |
| | | <j-search-select-tag placeholder="è¯·éæ©äº§çº¿" v-model="model.factoryId" |
| | | dict="base_factory,factory_name,id,del_flag=0 and factory_category='3'" |
| | | @change="factorySelectChange"></j-search-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç©æç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber"> |
| | | <a-input v-model="model.materialNumber" placeholder="请è¾å
¥ç©æç¼ç " ></a-input> |
| | | <j-search-select-tag v-model="model.materialNumber" placeholder="è¯·éæ©ç©æç¼ç " |
| | | :dict-options="materialNumberDictOptions" |
| | | @change="materialNumberSelectChange"></j-search-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <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" placeholder="请è¾å
¥ç©æåç§°" readOnly></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æ¹æ¬¡å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchNumber"> |
| | | <a-input v-model="model.batchNumber" placeholder="请è¾å
¥æ¹æ¬¡å·" ></a-input> |
| | | <j-search-select-tag v-model="model.batchNumber" placeholder="è¯·éæ©æ¹æ¬¡å·" |
| | | :dict-options="batchNumberDictOptions" |
| | | @change="batchNumberSelectChange"></j-search-select-tag> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | <a-input-number v-model="model.quantity" placeholder="请è¾å
¥æ°é" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å©ä½æ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remainingQuantity"> |
| | | <a-input-number v-model="model.remainingQuantity" placeholder="请è¾å
¥å©ä½æ°é" style="width: 100%" /> |
| | | <a-col :span="12" v-if="materialCategory === 'STEEL_BALL'"> |
| | | <a-form-model-item label="é¢ç尺寸" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="steelBallSize"> |
| | | <j-search-select-tag v-model="model.steelBallSize" placeholder="è¯·éæ©é¢ç尺寸" dict="steel_ball_size" |
| | | style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <script> |
| | | |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: 'MesMaterialLoadingForm', |
| | | components: { |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | export default { |
| | | name: 'MesMaterialLoadingForm', |
| | | components: {}, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | factoryId: [ |
| | | { required: true, message: '产线æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | materialNumber: [ |
| | | { required: true, message: 'ç©æç¼ç æ¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | materialName: [ |
| | | { required: true, message: 'ç©æåç§°æ¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | batchNumber: [ |
| | | { required: true, message: 'æ¹æ¬¡å·æ¯å¿
é项', trigger: 'change' } |
| | | ], |
| | | quantity: [ |
| | | { required: true, message: 'æ°éæ¯å¿
填项', trigger: 'change' } |
| | | ], |
| | | steelBallSize: [ |
| | | { required: false, message: 'é¢ç尺寸æ¯å¿
填项', trigger: 'change' } |
| | | ] |
| | | }, |
| | | materialCategory: undefined, |
| | | batchNumberDictOptions: [], |
| | | inventoryList: [], |
| | | url: { |
| | | add: '/mes/mesMaterialLoading/add', |
| | | edit: '/mes/mesMaterialLoading/edit', |
| | | queryById: '/mes/mesMaterialLoading/queryById', |
| | | queryMaterialInventory: '/lsw/materialInventory/queryMaterialInventory' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | }, |
| | | data () { |
| | | return { |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/mes/mesMaterialLoading/add", |
| | | edit: "/mes/mesMaterialLoading/edit", |
| | | queryById: "/mes/mesMaterialLoading/queryById" |
| | | materialNumberDictOptions() { |
| | | let materialNumberArr = new Set() |
| | | let materialNumberOptions = [] |
| | | for (let item of this.inventoryList) { |
| | | if (!materialNumberArr.has(item.materialNumber)) { |
| | | materialNumberOptions.push({ |
| | | value: item.materialNumber, |
| | | text: item.materialNumber + '(' + item.materialName + ')', |
| | | materialCategory: item.materialCategory, |
| | | materialName: item.materialName |
| | | }) |
| | | materialNumberArr.add(item.materialNumber) |
| | | } |
| | | } |
| | | return materialNumberOptions |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.edit(this.modelDefault); |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | 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'; |
| | | } |
| | | 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; |
| | | }) |
| | | 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' |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | 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 |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | factorySelectChange(val) { |
| | | getAction(this.url.queryMaterialInventory, { factoryId: val }).then((res) => { |
| | | if (res.success) { |
| | | this.inventoryList = res.result.map(item => ({ ...item })) |
| | | } |
| | | }) |
| | | }, |
| | | materialNumberSelectChange(val) { |
| | | let option = this.materialNumberDictOptions.find(item => item.value === val) |
| | | if (option) { |
| | | this.model.materialName = option.materialName |
| | | this.materialCategory = option.materialCategory |
| | | let map = this.inventoryList.filter(item => item.materialNumber === val).map(item => ({ |
| | | value: item.batchNumber, |
| | | text: item.batchNumber, |
| | | quantity: item.quantity |
| | | })) |
| | | this.batchNumberDictOptions = [...map] |
| | | this.validatorRules.steelBallSize[0].required = true |
| | | } else { |
| | | this.model.materialName = '' |
| | | this.materialCategory = undefined |
| | | this.batchNumberDictOptions = [] |
| | | this.validatorRules.steelBallSize[0].required = false |
| | | } |
| | | }, |
| | | batchNumberSelectChange(val) { |
| | | let option = this.batchNumberDictOptions.find(item => item.value === val) |
| | | if (option) { |
| | | this.model.quantity = option.quantity |
| | | } else { |
| | | this.model.quantity = null |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | handleEquipmentChange(id) { |
| | | getAction(this.url.queryByEquipmentId, {equipmentId: id}).then(res => { |
| | | if (res.success) { |
| | | console.log(res.result) |
| | | this.model = { |
| | | ...this.model, |
| | | standardId: res.result.id, |
| | |
| | | this.$message.error("è¯·å®æææå¿
å¡«ä¿¡æ¯ååæäº¤ï¼") |
| | | } else { |
| | | let tableData = this.$refs.table.getTableData().fullData |
| | | if (!tableData || tableData.length === 0) { |
| | | this.$message.error("ç¹æ£é¡¹ä¸ºç©ºï¼æ æ³æäº¤ï¼") |
| | | return |
| | | } |
| | | const data = { |
| | | ...this.model, |
| | | workOrderId: this.workOrderId, |
| | |
| | | }) |
| | | }, |
| | | resetFormData() { |
| | | this.$refs.form.resetFields() |
| | | if (this.$refs.form) { |
| | | this.$refs.form.resetFields() |
| | | } |
| | | this.model = {} |
| | | this.dataSource = [] |
| | | }, |
| | |
| | | name: 'MesProductionWorkOrderProcessCheckModal', |
| | | data () { |
| | | return { |
| | | title: '设å¤ç¹æ£', |
| | | title: 'å·¥èºç¹æ£', |
| | | width: 1200, |
| | | visible: false, |
| | | loading: false, |
| | |
| | | this.$message.error("è¯·å®æææå¿
å¡«ä¿¡æ¯ååæäº¤ï¼") |
| | | } else { |
| | | let tableData = this.$refs.table.getTableData().fullData |
| | | if (!tableData || tableData.length === 0) { |
| | | this.$message.error("ç¹æ£é¡¹ä¸ºç©ºï¼æ æ³æäº¤ï¼") |
| | | return |
| | | } |
| | | const data = { |
| | | equipmentId: this.model.equipmentId, |
| | | workOrderId: this.workOrderId, |
| | | checkDetailList: tableData |
| | | } |
| | | console.log(data) |
| | | postAction(this.url.addProcessCheck, data).then(res=> { |
| | | if (res.success) { |
| | | this.$message.success(res.message) |