¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æå°æºIP"> |
| | | <j-input |
| | | placeholder="请è¾å
¥æå°æºIPæ£ç´¢" |
| | | v-model="queryParam.printerIp " |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <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> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢ |
| | | </a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | filterMultiple="filterMultiple" |
| | | :columns="columns" |
| | | :rowClassName="tableRowClass" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span |
| | | slot="status" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.printerStatus==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.printerStatus==1" |
| | | class="success" |
| | | >å¯ç¨</span> |
| | | <a-badge |
| | | v-if="record.printerStatus==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.printerStatus==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.printerStatus == 0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å¯ç¨å?" |
| | | @confirm="() => handleActive(record.id)" |
| | | > |
| | | <a>å¯ç¨</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.printerStatus == 1"> |
| | | <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> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <printer-config-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></printer-config-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | //æéå¼å
¥ ç»ä»¶ |
| | | import PrinterConfigModel from './modules/printerConfig/PrinterConfigModel' |
| | | |
| | | import { getAction, requestPut } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | |
| | | export default { |
| | | name: 'PrinterConfigList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | PrinterConfigModel, |
| | | JEllipsis, |
| | | JInput |
| | | }, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | /* æåºåæ° */ |
| | | isorter:{ |
| | | column: 'printerIp', |
| | | order: 'asc', |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æå°æºIP', |
| | | align: 'center', |
| | | dataIndex: 'printerIp' |
| | | }, |
| | | { |
| | | title: 'æå°æºåç§°', |
| | | align: 'center', |
| | | dataIndex: 'printerName' |
| | | }, |
| | | { |
| | | title: 'æå°æºç«¯å£', |
| | | align: 'center', |
| | | dataIndex: 'portNumber' |
| | | }, |
| | | { |
| | | title: 'æå°æºåå·', |
| | | align: 'center', |
| | | dataIndex: 'printerModel' |
| | | }, |
| | | { |
| | | width: 100, |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status' |
| | | }, |
| | | dataIndex: 'printerStatus' |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/base/printerConfig/list', |
| | | delete: '/base/printerConfig/delete', |
| | | active: '/base/printerConfig/active' |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.printerStatus != '1') { |
| | | return 'frozenRowClass' |
| | | } |
| | | return '' |
| | | }, |
| | | //å¯ç¨ç¦ç¨ |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error('请设置url.active!') |
| | | return |
| | | } |
| | | let that = this |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 15px; |
| | | padding-bottom: 15px; |
| | | } |
| | | |
| | | .anty-row-operator button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | /deep/ .ant-btn-danger { |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :maskClosable="false" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æå°æºIP" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æå°æºIP" |
| | | v-decorator="['printerIp', validatorRules.printerIp]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æå°æºåç§°" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æå°æºç«¯å£" |
| | | v-decorator="['printerName', validatorRules.printerName]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æå°æºç«¯å£" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æå°æºç«¯å£" |
| | | v-decorator="['portNumber', validatorRules.portNumber]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æå°æºåå·" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥æå°æºåå·" |
| | | v-decorator="['printerModel', validatorRules.printerModel]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { duplicateCheck } from '@/api/api' //é夿 ¡éª |
| | | |
| | | export default { |
| | | name: 'PrinterConfigModel', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | treeData: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | printerIp: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æå°æºIP' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | ] |
| | | }, |
| | | printerName: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æå°æºåç§°' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | ] |
| | | }, |
| | | portNumber: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æå°æºç«¯å£' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateName } |
| | | ] |
| | | }, |
| | | |
| | | printerModel: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥æå°æºåå·' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' } |
| | | ] |
| | | } |
| | | }, |
| | | url: { |
| | | add: '/base/printerConfig/add', |
| | | edit: '/base/printerConfig/edit' |
| | | }, |
| | | nextFactoryOptions: [] |
| | | } |
| | | }, |
| | | |
| | | |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | this.warehouseId = record.id |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'printerIp','printerName', 'portNumber', 'printerModel') |
| | | ) |
| | | }) |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | console.log('表åå¼:', this.form.getFieldsValue()) |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | let formData = Object.assign(this.model, values) |
| | | httpAction(httpurl, formData, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'base_printer_config', |
| | | fieldName: 'port_number', |
| | | fieldVal: value, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true' |
| | | } |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback() |
| | | } else { |
| | | callback('æå°æºç«¯å£å·²åå¨!') |
| | | } |
| | | }) |
| | | }, |
| | | // å
³éå¼¹çªæ¶æ¸
é¤è¡¨åæ ¡éª |
| | | removeValidate() { |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <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-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
| | | <!-- <a-row :gutter="24">--> |
| | | <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.cuttingId" />--> |
| | | <!-- </a-form-item>--> |
| | | <!-- </a-col>--> |
| | | <!-- <a-col :md="6" :sm="8">--> |
| | | <!-- <a-form-item label="åå
·æ¡ç ">--> |
| | | <!-- <a-input placeholder="请è¾å
¥åå
·æ¡ç " v-model="queryParam.cuttingBarcode" />--> |
| | | <!-- </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>--> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="åå
·æ¡ç "> |
| | | <a-input placeholder="请è¾å
¥åå
·æ¡ç " v-model="queryParam.cuttingBarcode" /> |
| | | </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> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: 'æ°é', |
| | | title: 'æ»æ°', |
| | | dataIndex: 'cuttingIdNumber', |
| | | align: "center" |
| | | align: "center", |
| | | customRender: (text, record, index) => { |
| | | const obj = { |
| | | children: text, |
| | | attrs: {} |
| | | }; |
| | | // åªå¨ç¬¬ä¸è¡æ¾ç¤ºæ»æ°éï¼å
¶ä»è¡æ¾ç¤ºç©º |
| | | if (record.rowSpan !== undefined && record.rowSpan > 0) { |
| | | obj.children = text; |
| | | obj.attrs.rowSpan = record.rowSpan; |
| | | } else if (record.rowSpan === 0) { |
| | | obj.children = ''; |
| | | obj.attrs.rowSpan = 0; |
| | | } else { |
| | | obj.children = text; |
| | | obj.attrs.rowSpan = 1; |
| | | } |
| | | return obj; |
| | | } |
| | | } |
| | | ], |
| | | url: { |
| | |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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> |
| | |
| | | |
| | | <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/' |
| | | |
| | | export default { |
| | | name: 'CuttingInboundModal', |
| | | components: { |
| | | JSelectToolingModal, |
| | | 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: 'receiveNumber', |
| | | scopedSlots: { customRender: 'receiveNumber' }, |
| | | scopedSlots: { customRender: 'receiveNumber' } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | add: '/cms/cuttingInbound/add', |
| | | detailList: '/cms/cuttingInbound/detailList', |
| | | detailList: '/cms/cuttingInbound/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) |
| | |
| | | return |
| | | } |
| | | // æ ¡éªå
¥åºæ°éæ¯å¦å¡«å |
| | | for(let i=0; i<this.dataSource.length; i++) { |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | if (!this.dataSource[i].receiveNumber || this.dataSource[i].receiveNumber <= 0) { |
| | | this.$message.error(`å¿
须填åå
¥åºæ°é`) |
| | | return |
| | |
| | | this.dataSource = [] |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | }, |
| | | }, |
| | | mounted() { |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('selectionRows', (data) => { |
| | | //getCurrSelected äºä»¶ æ¥æ¶ç»ä»¶ä¼ éçåæ° |
| | | for (let i = 0; i < data.length; i++) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |