| | |
| | | <a-button type="info" v-if="hasPerm('WmsMaterial:exportExcel')" icon="download" @click="WmsMaterialToExcel()"> |
| | | 导出 |
| | | </a-button> |
| | | <a-button type="primary" v-if="hasPerm('WmsMaterial:add')" icon="plus" @click="$refs.addForm.add()">新增物料信息表</a-button> |
| | | <!-- <a-button type="primary" v-if="hasPerm('WmsMaterial:add')" icon="plus" @click="$refs.addForm.add()">新增物料信息表</a-button> --> |
| | | <!-- 自定义 --> |
| | | <a-button type="primary" v-if="hasPerm('WmsMaterial:add')" icon="plus" @click="$refs.tabForm.add()">新增tab</a-button> |
| | | <a-button type="primary" v-if="hasPerm('WmsMaterial:add')" icon="plus" @click="$refs.tabForm.add()">新增物料信息</a-button> |
| | | </div> |
| | | </template> |
| | | <span slot="isDisabledscopedSlots" slot-scope="text"> |
| | |
| | | <a-tabs default-active-key="1" @change="callbacktab"> |
| | | <a-tab-pane key="1" tab="基本信息"> |
| | | <!-- <add-form ref="addFormRef" @ok="handleOk" /> --> |
| | | |
| | | <!-- 基本信息 --> |
| | | <a-form :form="form"> |
| | | <a-form-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | |
| | | </a-form> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="2" tab="控制属性" force-render> |
| | | <add-control-rule ref="WmsControlRule" /> |
| | | <add-control-rule v-if="visible" ref="WmsControlRule" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="3" tab="批次属性"> |
| | | 需求待定 |
| | | </a-tab-pane> |
| | | <a-tab-pane key="4" tab="替代品管理"> |
| | | <add-form-sub ref="addFormWmsSubstituteGoodRef" /> |
| | | <add-form-sub v-if="visible" ref="addFormWmsSubstituteGoodRef" /> |
| | | </a-tab-pane> |
| | | <a-tab-pane key="5" tab="客户"> |
| | | <add-form-base-customer ref="addFormBaseCustomer" /> |
| | | <add-form-base-customer v-if="visible" ref="addFormBaseCustomer" /> |
| | | </a-tab-pane> |
| | | |
| | | <!-- <a-tab-pane key="6" tab="包装关系"> |
| | |
| | | callbacktab(e) { |
| | | |
| | | //包装关系 |
| | | if (e == 6) { |
| | | this.$nextTick(() => { |
| | | let materialType = this.form.getFieldValue('materialType'); |
| | | // 调接口 传物料类型 |
| | | this.$refs.addFormContainerPackagingRef.initShow(materialType) |
| | | |
| | | }) |
| | | } |
| | | // if (e == 6) { |
| | | // this.$nextTick(() => { |
| | | // let materialType = this.form.getFieldValue('materialType'); |
| | | // // 调接口 传物料类型 |
| | | // this.$refs.addFormContainerPackagingRef.initShow(materialType) |
| | | // }) |
| | | // } |
| | | // 替代品 |
| | | if (e == 4) { |
| | | let materialCode = this.form.getFieldValue('materialCode'); |
| | | let materialName = this.form.getFieldValue('materialName'); |
| | | this.$refs.addFormWmsSubstituteGoodRef.initShow(materialCode, materialName) |
| | | // let materialCode = this.form.getFieldValue('materialCode'); |
| | | // let materialName = this.form.getFieldValue('materialName'); |
| | | this.$refs.addFormWmsSubstituteGoodRef.initShowSubstituteGood() |
| | | } |
| | | }, |
| | | handleOk() { }, |
| | |
| | | // } |
| | | |
| | | console.log(6666666666666 + '控制属性') |
| | | |
| | | var ControlRuleld = this.$refs.WmsControlRule.form.getFieldValue('id') || '' |
| | | |
| | | let SubstituteGoodList = [] |
| | |
| | | handleCancel() { |
| | | this.form.resetFields() |
| | | this.visible = false |
| | | // this.$refs.WmsControlRule.form.resetFields() |
| | | // this.$refs.addFormWmsSubstituteGoodRef.list =[] |
| | | // this.$refs.addFormWmsSubstituteGoodRef.list =[] |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleOk(){ |
| | | |
| | | }, |
| | | moment, |
| | | // 初始化方法 |
| | | add(record) { |
| | |
| | | */ |
| | | handleSubmit() { |
| | | |
| | | // if(){ |
| | | |
| | | // } |
| | | if(this.$refs.showList.selectedRows.length!=1){ |
| | | this.$message.warning("只能选择一个") |
| | | return |
| | | } |
| | | this.visible = false |
| | | let record1 = this.$refs.showList.selectedRows[0]; |
| | | let record =record1; |
| | | console.log("5555555") |
| | | debugger |
| | | let record = this.$refs.showList.selectedRows[0]; |
| | | this.form.setFieldsValue({ |
| | | id: record.id, |
| | | ruleCode: record.ruleCode, |
| | |
| | | <template> |
| | | <!-- 控制属性规则 --> |
| | | <div ref="boxOutWrap" class="boxOutWrap"> |
| | | <div ref="boxOutWrap"> |
| | | <div ref="boxForm" class="boxForm"> |
| | | <a-card :bordered="false" :bodyStyle="tstyle"> |
| | | <div class="table-page-search-wrapper" v-if="hasPerm('WmsControlRule:page')"> |
| | |
| | | </div> |
| | | <a-card :bordered="false"> |
| | | <s-table ref="table" :columns="columns" :data="loadData" :alert="true" @changeTablePage="pageInfo = $event" |
| | | :scroll="{ x: true, y: tableHeight }" :rowKey="record => record.id" |
| | | :scroll="{ x: true}" :rowKey="record => record.id" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"> |
| | | <template class="table-operator" slot="operator" v-if="hasPerm('WmsControlRule:add')"> |
| | | <!-- <div ref="actionBar" class="actionBar"> |
| | |
| | | </a-popconfirm> |
| | | </span> --> |
| | | </s-table> |
| | | <add-form ref="addForm" @ok="handleOk" /> |
| | | <edit-form ref="editForm" @ok="handleOk" /> |
| | | <excel-form ref="excelForm" @ok="handleOk" /> |
| | | |
| | | <!-- 自定义 --> |
| | | <detail-form ref="detailForm" @ok="handleOk" /> |
| | | |
| | | </a-card> |
| | | </div> |
| | |
| | | } from '@/api/modular/main/WmsBase/WmsControlRuleManage' |
| | | //自定义table高度 |
| | | import setTableHtMixin from '@/mixins/handleTableHt.js' |
| | | import addForm from './addForm.vue' |
| | | import { exportExcel } from '@/utils/exportToExcel' |
| | | import { downloadFile } from '@/utils/util' |
| | | import editForm from './editForm.vue' |
| | | import excelForm from './excelForm.vue' |
| | | import detailForm from './details.vue' |
| | | |
| | | |
| | | export default { |
| | | mixins: [setTableHtMixin], |
| | | // mixins: [setTableHtMixin], |
| | | components: { |
| | | STable, |
| | | addForm, |
| | | editForm, |
| | | excelForm, |
| | | detailForm |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | <a-form-item label="替代品物料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <!-- <a-input placeholder="请输入替代品物料编号" |
| | | v-decorator="['substituteMaterialCode', { rules: [{ required: true, message: '请输入替代品物料编号!' }] }]" /> --> |
| | | <a-select style="width: 100%" placeholder="请选择替代品物料编号" v-decorator="['substituteMaterialCode']"> |
| | | <a-select style="width: 100%" placeholder="请选择替代品物料编号" v-decorator="['substituteMaterialCode', { rules: [{ required: true, message: '请输入替代品物料编号!' }] }]" > |
| | | <a-select-option v-for="(item, index) in selectTypeData" :key="index" :value="item.materialCode">{{ |
| | | item.materialName }}</a-select-option> |
| | | </a-select> |
| | |
| | | |
| | | <script> |
| | | import moment from 'moment' |
| | | import { |
| | | WmsSubstituteGoodAdd |
| | | } from '@/api/modular/main/WmsBase/WmsSubstituteGoodManage' |
| | | |
| | | import { WmsMaterialPage, WmsMaterialDelete, WmsMaterialToExcel } from '@/api/modular/main/WmsBase/WmsMaterialManage' |
| | | import { WmsMaterialPage } from '@/api/modular/main/WmsBase/WmsMaterialManage' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | <template> |
| | | <!-- 替代品管理 --> |
| | | <!-- 替代品管理 -表格内容 --> |
| | | <div style="background-color: white"> |
| | | <!-- <a-spin :spinning="loading"> --> |
| | | <div class="wms-task-management-detail-div"> |
| | |
| | | <!-- <span style="font-weight:bold;cursor:default;"> |
| | | <a style="cursor:default;">{{ row.no }}</a>单据详情 |
| | | </span> --> |
| | | 物料编号: {{ materialCode }} |
| | | |
| | | 物料名称: {{ materialName }} |
| | | <!-- 物料编号: {{ materialCode }} |
| | | 物料名称: {{ materialName }} --> |
| | | <div style="margin-top: 10px;"> |
| | | <a-table :columns="columns" :data-source="list" row-key="id" :pagination="false" :scroll="{ x: true }"> |
| | | <template slot="index" slot-scope="text, record, index">{{ index + 1 }}</template> |
| | |
| | | </a-table> |
| | | </div> |
| | | </div> |
| | | |
| | | <p @click="$refs.showList.add()">新增行</p> |
| | | |
| | | <show-list ref="showList" @ok="handleSubmit" /> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | } |
| | | }, |
| | | |
| | | initShow(materialCode,materialName) { |
| | | this.materialCode = materialCode |
| | | this.materialName = materialName |
| | | this.loading = true |
| | | this.getList(() => { |
| | | this.loading = false |
| | | }) |
| | | initShowSubstituteGood() { |
| | | // this.materialCode = materialCode |
| | | // this.materialName = materialName |
| | | // this.loading = true |
| | | // this.getList(() => { |
| | | // this.loading = false |
| | | // }) |
| | | }, |
| | | getList(row) { |
| | | let params = { id: row.id } |
| | |
| | | |
| | | }, |
| | | handleSubmit(item) { |
| | | var arr1 = this.list.filter(key => key.substituteMaterialCode === item.substituteMaterialCode) |
| | | if(arr1.length>0){ |
| | | this.$message.warning("已存在相同物料") |
| | | return |
| | | } |
| | | this.list.push(item) |
| | | this.visible = false |
| | | }, |
| | |
| | | }, |
| | | itemDelete(record, index) { |
| | | this.list.splice(index, 1) |
| | | }, |
| | | addLine(){ |
| | | this.list.push({ |
| | | |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div ref="boxOutWrap" class="boxOutWrap"> |
| | | <div ref="boxOutWrap" class=""> |
| | | <div ref="boxForm" class="boxForm"> |
| | | <a-card :bordered="false" :bodyStyle="tstyle"> |
| | | |
| | |
| | | </div> |
| | | <a-card :bordered="false"> |
| | | <s-table ref="table" :columns="columns" :data="loadData" :alert="true" @changeTablePage="pageInfo = $event" |
| | | :scroll="{ x: true, y: tableHeight }" :rowKey="(record) => record.id" |
| | | :scroll="{ x: true }" :rowKey="(record) => record.id" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"> |
| | | <template class="table-operator" slot="operator" v-if="hasPerm('BaseCustomer:add')"> |
| | | <!-- <div ref="actionBar" class="actionBar"> |