作者 张晓杰

1. 库存管理和贸易库存管理追加BOH单挑更新和批量更新;

2. 基本表追加导入功能;
3. 贸易物料表追加导入功能;
4. 库存管理新增单独的库存表,不再使用视图
5. 追加原材料管理
1 NODE_ENV=production 1 NODE_ENV=production
2 -VUE_APP_API_BASE_URL=http://factory.zgftlm.com/jeecg-boot 2 +# VUE_APP_API_BASE_URL=http://factory.zgftlm.com/jeecg-boot
  3 +VUE_APP_API_BASE_URL=http://117.72.206.125/jeecg-boot
3 VUE_APP_CAS_BASE_URL=http://localhost:8888/cas 4 VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
4 VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview 5 VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
@@ -4,6 +4,11 @@ @@ -4,6 +4,11 @@
4 <a-tab-pane key="1" tab="原物料管理" force-render> 4 <a-tab-pane key="1" tab="原物料管理" force-render>
5 <tbl-material-list></tbl-material-list> 5 <tbl-material-list></tbl-material-list>
6 </a-tab-pane> 6 </a-tab-pane>
  7 + <a-tab-pane key="6" tab="原材料管理">
  8 + <template v-if="TblRawMaterialsListFlag">
  9 + <tbl-rawMaterials-list></tbl-rawMaterials-list>
  10 + </template>
  11 + </a-tab-pane>
7 <a-tab-pane key="2" tab="半成品管理"> 12 <a-tab-pane key="2" tab="半成品管理">
8 <template v-if="TblSemiFinishedListFlag"> 13 <template v-if="TblSemiFinishedListFlag">
9 <tbl-semi-finished-list></tbl-semi-finished-list> 14 <tbl-semi-finished-list></tbl-semi-finished-list>
@@ -34,13 +39,15 @@ import TblMaterialList from './TblMaterialList' @@ -34,13 +39,15 @@ import TblMaterialList from './TblMaterialList'
34 import TblSemiFinishedList from './TblSemiFinishedList' 39 import TblSemiFinishedList from './TblSemiFinishedList'
35 import TblConsumablesList from './TblConsumablesList.vue' 40 import TblConsumablesList from './TblConsumablesList.vue'
36 import TblProtectionList from './TblProtectionList.vue' 41 import TblProtectionList from './TblProtectionList.vue'
  42 +import TblRawMaterialsList from './TblRawMaterialsList.vue'
37 export default { 43 export default {
38 components: { 44 components: {
39 FinishProductManageList, 45 FinishProductManageList,
40 TblMaterialList, 46 TblMaterialList,
41 TblSemiFinishedList, 47 TblSemiFinishedList,
42 TblConsumablesList, 48 TblConsumablesList,
43 - TblProtectionList 49 + TblProtectionList,
  50 + TblRawMaterialsList
44 }, 51 },
45 data() { 52 data() {
46 return { 53 return {
@@ -48,7 +55,8 @@ export default { @@ -48,7 +55,8 @@ export default {
48 TblMaterialListFlag: false, 55 TblMaterialListFlag: false,
49 TblSemiFinishedListFlag: false, 56 TblSemiFinishedListFlag: false,
50 TblConsumablesListFlag: false, 57 TblConsumablesListFlag: false,
51 - TblProtectionListFlag: false 58 + TblProtectionListFlag: false,
  59 + TblRawMaterialsListFlag: false
52 } 60 }
53 }, 61 },
54 methods: { 62 methods: {
@@ -66,6 +74,8 @@ export default { @@ -66,6 +74,8 @@ export default {
66 this.TblConsumablesListFlag = true; 74 this.TblConsumablesListFlag = true;
67 case "5": 75 case "5":
68 this.TblProtectionListFlag = true; 76 this.TblProtectionListFlag = true;
  77 + case "6":
  78 + this.TblRawMaterialsListFlag = true;
69 default: 79 default:
70 break; 80 break;
71 } 81 }
@@ -22,6 +22,16 @@ @@ -22,6 +22,16 @@
22 <!-- 操作按钮区域 --> 22 <!-- 操作按钮区域 -->
23 <div class="table-operator"> 23 <div class="table-operator">
24 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 24 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  25 + <a-upload
  26 + name="file"
  27 + :showUploadList="false"
  28 + :multiple="false"
  29 + :headers="tokenHeader"
  30 + :action="importExcelUrl"
  31 + @change="handleImportExcel"
  32 + >
  33 + <a-button type="primary" icon="import">导入</a-button>
  34 + </a-upload>
25 </div> 35 </div>
26 36
27 <!-- table区域-begin --> 37 <!-- table区域-begin -->
@@ -118,11 +128,17 @@ export default { @@ -118,11 +128,17 @@ export default {
118 url: { 128 url: {
119 list: '/baseLibrary/baseLibraryInfo/list', 129 list: '/baseLibrary/baseLibraryInfo/list',
120 delete: "/baseLibrary/baseLibraryInfo/delete", 130 delete: "/baseLibrary/baseLibraryInfo/delete",
  131 + importExcelUrl: 'baseLibrary/baseLibraryInfo/importExcel',
121 }, 132 },
122 visible: false, 133 visible: false,
123 imgUrl: '', 134 imgUrl: '',
124 } 135 }
125 }, 136 },
  137 + computed: {
  138 + importExcelUrl: function () {
  139 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  140 + },
  141 + },
126 methods: { 142 methods: {
127 getQRCode(record) { 143 getQRCode(record) {
128 this.visible = true 144 this.visible = true
@@ -24,6 +24,16 @@ @@ -24,6 +24,16 @@
24 <!-- 操作按钮区域 --> 24 <!-- 操作按钮区域 -->
25 <div class="table-operator"> 25 <div class="table-operator">
26 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 26 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  27 + <a-upload
  28 + name="file"
  29 + :showUploadList="false"
  30 + :multiple="false"
  31 + :headers="tokenHeader"
  32 + :action="importExcelUrl"
  33 + @change="handleImportExcel"
  34 + >
  35 + <a-button type="primary" icon="import">导入</a-button>
  36 + </a-upload>
27 <a-dropdown v-if="selectedRowKeys.length > 0"> 37 <a-dropdown v-if="selectedRowKeys.length > 0">
28 <a-menu slot="overlay"> 38 <a-menu slot="overlay">
29 <a-menu-item key="1" @click="batchDel"> 39 <a-menu-item key="1" @click="batchDel">
@@ -187,6 +197,7 @@ export default { @@ -187,6 +197,7 @@ export default {
187 list: '/meterial/consumables/list', 197 list: '/meterial/consumables/list',
188 delete: '/meterial/consumables/delete', 198 delete: '/meterial/consumables/delete',
189 deleteBatch: '/meterial/consumables/deleteBatch', 199 deleteBatch: '/meterial/consumables/deleteBatch',
  200 + importExcelUrl: 'meterial/tblMaterial/importExcel',
190 }, 201 },
191 dictOptions: {}, 202 dictOptions: {},
192 superFieldList: [], 203 superFieldList: [],
@@ -28,6 +28,16 @@ @@ -28,6 +28,16 @@
28 <!-- 操作按钮区域 --> 28 <!-- 操作按钮区域 -->
29 <div class="table-operator"> 29 <div class="table-operator">
30 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 30 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  31 + <a-upload
  32 + name="file"
  33 + :showUploadList="false"
  34 + :multiple="false"
  35 + :headers="tokenHeader"
  36 + :action="importExcelUrl"
  37 + @change="handleImportExcel"
  38 + >
  39 + <a-button type="primary" icon="import">导入</a-button>
  40 + </a-upload>
31 <a-dropdown v-if="selectedRowKeys.length > 0"> 41 <a-dropdown v-if="selectedRowKeys.length > 0">
32 <a-menu slot="overlay"> 42 <a-menu slot="overlay">
33 <a-menu-item key="1" @click="batchDel"> 43 <a-menu-item key="1" @click="batchDel">
@@ -24,6 +24,16 @@ @@ -24,6 +24,16 @@
24 <!-- 操作按钮区域 --> 24 <!-- 操作按钮区域 -->
25 <div class="table-operator"> 25 <div class="table-operator">
26 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 26 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  27 + <a-upload
  28 + name="file"
  29 + :showUploadList="false"
  30 + :multiple="false"
  31 + :headers="tokenHeader"
  32 + :action="importExcelUrl"
  33 + @change="handleImportExcel"
  34 + >
  35 + <a-button type="primary" icon="import">导入</a-button>
  36 + </a-upload>
27 <a-dropdown v-if="selectedRowKeys.length > 0"> 37 <a-dropdown v-if="selectedRowKeys.length > 0">
28 <a-menu slot="overlay"> 38 <a-menu slot="overlay">
29 <a-menu-item key="1" @click="batchDel"> 39 <a-menu-item key="1" @click="batchDel">
@@ -111,7 +121,7 @@ import '@/assets/less/TableExpand.less' @@ -111,7 +121,7 @@ import '@/assets/less/TableExpand.less'
111 import VueQr from 'vue-qr' 121 import VueQr from 'vue-qr'
112 122
113 export default { 123 export default {
114 - name: 'TblMaterialList', 124 + name: 'TblProtectionList',
115 mixins: [JeecgListMixin], 125 mixins: [JeecgListMixin],
116 components: { 126 components: {
117 TblProtectionModal, 127 TblProtectionModal,
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="品名">
  9 + <j-input placeholder="请输入品名" v-model="queryParam.productName"></j-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  14 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15 + <a-button type="primary" @click="searchReset" icon="reload"
  16 + style="margin-left: 8px">重置</a-button>
  17 + </span>
  18 + </a-col>
  19 + </a-row>
  20 + </a-form>
  21 + </div>
  22 + <!-- 查询区域-END -->
  23 +
  24 + <!-- 操作按钮区域 -->
  25 + <div class="table-operator">
  26 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  27 + <a-upload
  28 + name="file"
  29 + :showUploadList="false"
  30 + :multiple="false"
  31 + :headers="tokenHeader"
  32 + :action="importExcelUrl"
  33 + @change="handleImportExcel"
  34 + >
  35 + <a-button type="primary" icon="import">导入</a-button>
  36 + </a-upload>
  37 + <a-dropdown v-if="selectedRowKeys.length > 0">
  38 + <a-menu slot="overlay">
  39 + <a-menu-item key="1" @click="batchDel">
  40 + <a-icon type="delete" />删除
  41 + </a-menu-item>
  42 + </a-menu>
  43 + <a-button style="margin-left: 8px">
  44 + 批量操作
  45 + <a-icon type="down" />
  46 + </a-button>
  47 + </a-dropdown>
  48 + </div>
  49 +
  50 + <!-- table区域-begin -->
  51 + <div>
  52 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
  53 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
  54 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  55 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  56 + </div>
  57 +
  58 + <a-table ref="table" size="middle" bordered rowKey="id" class="j-table-force-nowrap" :scroll="{ x: true }"
  59 + :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading"
  60 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" @change="handleTableChange">
  61 + <template slot="htmlSlot" slot-scope="text">
  62 + <div v-html="text"></div>
  63 + </template>
  64 + <template slot="imgSlot" slot-scope="text, record">
  65 + <span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
  66 + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
  67 + style="max-width: 80px; font-size: 12px; font-style: italic" />
  68 + </template>
  69 + <template slot="fileSlot" slot-scope="text">
  70 + <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
  71 + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
  72 + 下载
  73 + </a-button>
  74 + </template>
  75 +
  76 + <span slot="action" slot-scope="text, record">
  77 + <a @click="getQRCode(record)">生成二维码</a>
  78 + <a-divider type="vertical" />
  79 + <a @click="handleEdit(record)">编辑</a>
  80 +
  81 + <a-divider type="vertical" />
  82 + <a-dropdown>
  83 + <a class="ant-dropdown-link">更多
  84 + <a-icon type="down" />
  85 + </a>
  86 + <a-menu slot="overlay">
  87 + <a-menu-item>
  88 + <a @click="handleDetail(record)">详情</a>
  89 + </a-menu-item>
  90 + <a-menu-item>
  91 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  92 + <a>删除</a>
  93 + </a-popconfirm>
  94 + </a-menu-item>
  95 + </a-menu>
  96 + </a-dropdown>
  97 + </span>
  98 + </a-table>
  99 + </div>
  100 +
  101 + <tbl-raw-materials-model ref="modalForm" @ok="modalFormOk" />
  102 +
  103 + <div>
  104 + <j-modal :width="250" :visible="visible" :maskClosable="false" switchFullscreen @cancel="handleCancel"
  105 + okText="打印完成" @ok="handleCancel">
  106 + <a-button v-print="'#printContent'" ghost type="primary">打印</a-button>
  107 + <section id="printContent">
  108 + <vue-qr :text="imgUrl" :size="200" :margin="21" :logoScale="0.2"> </vue-qr>
  109 + </section>
  110 + </j-modal>
  111 + </div>
  112 + </a-card>
  113 +</template>
  114 +
  115 +
  116 +
  117 +<script>
  118 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  119 +import TblRawMaterialsModel from './modules/TblRawMaterialsModel.vue'
  120 +import '@/assets/less/TableExpand.less'
  121 +import VueQr from 'vue-qr'
  122 +
  123 +export default {
  124 + name: 'TblConsumablesList',
  125 + mixins: [JeecgListMixin],
  126 + components: {
  127 + TblRawMaterialsModel,
  128 + VueQr,
  129 + },
  130 + data() {
  131 + return {
  132 + visible: false,
  133 + imgUrl: '',
  134 + description: 'tbl_material管理页面',
  135 + // 表头
  136 + columns: [
  137 + {
  138 + title: '#',
  139 + dataIndex: '',
  140 + key: 'rowIndex',
  141 + width: 60,
  142 + align: 'center',
  143 + customRender: function (t, r, index) {
  144 + return parseInt(index) + 1
  145 + },
  146 + },
  147 + {
  148 + title: '编号',
  149 + align: 'center',
  150 + dataIndex: 'partNumber',
  151 + },
  152 + {
  153 + title: '品名',
  154 + align: 'center',
  155 + dataIndex: 'productName',
  156 + },
  157 + {
  158 + title: '型号',
  159 + align: 'center',
  160 + dataIndex: 'type',
  161 + },
  162 + {
  163 + title: '规格',
  164 + align: 'center',
  165 + dataIndex: 'spec',
  166 + },
  167 + {
  168 + title: '采购性质',
  169 + align: 'center',
  170 + dataIndex: 'buyingClassify',
  171 + },
  172 + {
  173 + title: '产品图片',
  174 + align: 'center',
  175 + dataIndex: 'pics',
  176 + scopedSlots: {
  177 + customRender: 'imgSlot',
  178 + },
  179 + },
  180 + {
  181 + title: '单位',
  182 + align: 'center',
  183 + dataIndex: 'unit',
  184 + },
  185 + {
  186 + title: '操作',
  187 + dataIndex: 'action',
  188 + align: 'center',
  189 + fixed: 'right',
  190 + width: 147,
  191 + scopedSlots: {
  192 + customRender: 'action',
  193 + },
  194 + },
  195 + ],
  196 + url: {
  197 + list: '/meterial/tblMaterial/rawMaterialsList',
  198 + delete: '/meterial/tblMaterial/delete',
  199 + deleteBatch: '/meterial/tblMaterial/deleteBatch',
  200 + exportXlsUrl: '/meterial/tblMaterial/exportXls',
  201 + importExcelUrl: 'meterial/tblMaterial/importExcel',
  202 + },
  203 + dictOptions: {},
  204 + superFieldList: [],
  205 + }
  206 + },
  207 + created() {
  208 + this.getSuperFieldList()
  209 + },
  210 + computed: {
  211 + importExcelUrl: function () {
  212 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  213 + },
  214 + },
  215 + methods: {
  216 + initDictConfig() { },
  217 + getSuperFieldList() {
  218 + let fieldList = []
  219 + fieldList.push({
  220 + type: 'string',
  221 + value: 'partNumber',
  222 + text: '编号',
  223 + dictCode: '',
  224 + })
  225 + fieldList.push({
  226 + type: 'string',
  227 + value: 'productName',
  228 + text: '品名',
  229 + dictCode: '',
  230 + })
  231 + fieldList.push({
  232 + type: 'string',
  233 + value: 'type',
  234 + text: '型号',
  235 + dictCode: '',
  236 + })
  237 + fieldList.push({
  238 + type: 'string',
  239 + value: 'spec',
  240 + text: '规格',
  241 + dictCode: '',
  242 + })
  243 + fieldList.push({
  244 + type: 'string',
  245 + value: 'buyingClassify',
  246 + text: '采购性质',
  247 + dictCode: 'buying_classify',
  248 + })
  249 + fieldList.push({
  250 + type: 'string',
  251 + value: 'supplierName',
  252 + text: '供应商名称',
  253 + dictCode: '',
  254 + })
  255 + fieldList.push({
  256 + type: 'string',
  257 + value: 'pics',
  258 + text: '产品图片',
  259 + dictCode: '',
  260 + })
  261 + this.superFieldList = fieldList
  262 + },
  263 + getQRCode(record) {
  264 + this.visible = true
  265 + this.imgUrl = record.partNumber;
  266 + //this.creatQrCode(record)
  267 + },
  268 + handleCancel() {
  269 + this.$emit('close')
  270 + this.visible = false
  271 + },
  272 + },
  273 +}
  274 +</script>
  275 +<style scoped>
  276 +@import '~@assets/less/common.less';
  277 +
  278 +@page {
  279 + size: auto;
  280 + /* auto is the initial value */
  281 + margin: 3mm;
  282 + /* this affects the margin in the printer settings */
  283 +}
  284 +</style>
  285 +
@@ -28,6 +28,16 @@ @@ -28,6 +28,16 @@
28 <!-- 操作按钮区域 --> 28 <!-- 操作按钮区域 -->
29 <div class="table-operator"> 29 <div class="table-operator">
30 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 30 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  31 + <a-upload
  32 + name="file"
  33 + :showUploadList="false"
  34 + :multiple="false"
  35 + :headers="tokenHeader"
  36 + :action="importExcelUrl"
  37 + @change="handleImportExcel"
  38 + >
  39 + <a-button type="primary" icon="import">导入</a-button>
  40 + </a-upload>
31 <a-dropdown v-if="selectedRowKeys.length > 0"> 41 <a-dropdown v-if="selectedRowKeys.length > 0">
32 <a-menu slot="overlay"> 42 <a-menu slot="overlay">
33 <a-menu-item key="1" @click="batchDel"> 43 <a-menu-item key="1" @click="batchDel">
@@ -184,7 +194,7 @@ export default { @@ -184,7 +194,7 @@ export default {
184 delete: '/meterial/tblSemiFinished/delete', 194 delete: '/meterial/tblSemiFinished/delete',
185 deleteBatch: '/meterial/tblSemiFinished/deleteBatch', 195 deleteBatch: '/meterial/tblSemiFinished/deleteBatch',
186 exportXlsUrl: '/meterial/tblSemiFinished/exportXls', 196 exportXlsUrl: '/meterial/tblSemiFinished/exportXls',
187 - importExcelUrl: 'meterial/tblSemiFinished/importExcel', 197 + importExcelUrl: 'meterial/tblMaterial/importExcel',
188 }, 198 },
189 dictOptions: {}, 199 dictOptions: {},
190 superFieldList: [], 200 superFieldList: [],
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <!-- 主表单区域 -->
  5 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  6 + <a-row>
  7 + <a-col :span="24">
  8 + <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
  9 + <a-input v-model="model.partNumber" placeholder="请输入编号" :disabled="this.excludeIds !== ''">
  10 + </a-input>
  11 + </a-form-model-item>
  12 + </a-col>
  13 + <a-col :span="24">
  14 + <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
  15 + <a-input v-model="model.productName" placeholder="请输入品名"></a-input>
  16 + </a-form-model-item>
  17 + </a-col>
  18 + <a-col :span="24">
  19 + <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
  20 + <a-input v-model="model.type" placeholder="请输入型号"></a-input>
  21 + </a-form-model-item>
  22 + </a-col>
  23 + <a-col :span="24">
  24 + <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
  25 + <a-input v-model="model.spec" placeholder="请输入规格"></a-input>
  26 + </a-form-model-item>
  27 + </a-col>
  28 + <a-col :span="24">
  29 + <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
  30 + <!-- <j-dict-select-tag type="selectUnit" placeholder="请选择单位" v-model="model.unit" /> -->
  31 + <a-input v-model="model.unit" placeholder="请输入单位"></a-input>
  32 + </a-form-model-item>
  33 + </a-col>
  34 + <a-col :span="24">
  35 + <a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierName">
  36 + <a-input v-model="model.supplierName" placeholder="请输入供应商名称"></a-input>
  37 + </a-form-model-item>
  38 + </a-col>
  39 + <a-col :span="24">
  40 + <a-form-model-item label="产品图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pics">
  41 + <j-image-upload isMultiple v-model="model.pics"></j-image-upload>
  42 + </a-form-model-item>
  43 + </a-col>
  44 + </a-row>
  45 + </a-form-model>
  46 + </j-form-container>
  47 + </a-spin>
  48 +</template>
  49 +
  50 +<script>
  51 +import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
  52 +import JFormContainer from '@/components/jeecg/JFormContainer'
  53 +import { duplicateCheck } from '@/api/api'
  54 +import { httpAction } from '@/api/manage'
  55 +export default {
  56 + name: 'TblRawMaterialsForm',
  57 + mixins: [JVxeTableModelMixin],
  58 + components: {
  59 + JFormContainer,
  60 + },
  61 + props: ['excludeIds', 'disabled'],
  62 + data() {
  63 + return {
  64 + labelCol: {
  65 + xs: {
  66 + span: 24
  67 + },
  68 + sm: {
  69 + span: 5
  70 + },
  71 + },
  72 + wrapperCol: {
  73 + xs: {
  74 + span: 24
  75 + },
  76 + sm: {
  77 + span: 16
  78 + },
  79 + },
  80 + model: {
  81 + meterialType: "5",
  82 + buyingClassify: "P"
  83 + },
  84 + // 新增时子表默认添加几行空数据
  85 + addDefaultRowNum: 1,
  86 + validatorRules: {
  87 + partNumber: [
  88 + { required: true, message: '请输入编号!' },
  89 + { validator: this.validatePartNumber }
  90 + ],
  91 + productName: [{ required: true, message: '请输入品名!' },],
  92 + type: [{ required: true, message: '请输入型号!' },],
  93 + spec: [{ required: true, message: '请输入规格!' },],
  94 + unit: [{ required: true, message: '请输入单位!' },],
  95 + supplierName: [{ required: true, message: '请输入供应商名称!' }],
  96 + pics: [{ required: true, message: '请上传产品图片!' }]
  97 + },
  98 + url: {
  99 + add: "/meterial/tblMaterial/add",
  100 + edit: "/meterial/tblMaterial/edit",
  101 + queryById: "/meterial/tblMaterial/queryById",
  102 + // tblPartSemifinished: {
  103 + // list: '/meterial/tblMaterial/queryTblPartSemifinishedByMainId'
  104 + // },
  105 + }
  106 + }
  107 + },
  108 + computed: {
  109 + formDisabled() {
  110 + return this.disabled
  111 + },
  112 + },
  113 + created() {
  114 +
  115 + },
  116 + methods: {
  117 + add() {
  118 + console.log(456)
  119 + },
  120 + edit(record) {
  121 + this.model = record;
  122 + },
  123 + handleOk() {
  124 + const that = this
  125 + // 触发表单验证
  126 + this.$refs.form.validate((valid) => {
  127 + if (valid) {
  128 + that.confirmLoading = true
  129 + let httpurl = ''
  130 + let method = ''
  131 + if (!this.model.id) {
  132 + httpurl += this.url.add
  133 + method = 'post'
  134 + } else {
  135 + httpurl += this.url.edit
  136 + method = 'put'
  137 + }
  138 + httpAction(httpurl, this.model, method)
  139 + .then((res) => {
  140 + if (res.success) {
  141 + that.$message.success(res.message)
  142 + that.$emit('ok')
  143 + } else {
  144 + that.$message.warning(res.message)
  145 + }
  146 + })
  147 + .finally(() => {
  148 + that.confirmLoading = false
  149 + that.close()
  150 + })
  151 + } else {
  152 + return false
  153 + }
  154 + })
  155 + },
  156 + close() {
  157 + this.$emit('close');
  158 + this.visible = false;
  159 + this.$refs.form.clearValidate();
  160 + },
  161 + validateError(msg) {
  162 + this.$message.error(msg)
  163 + },
  164 + validatePartNumber(rule, value, callback) {
  165 + var params = {
  166 + tableName: "tbl_material",
  167 + fieldName: "part_number",
  168 + fieldVal: value,
  169 + dataId: this.model.id
  170 + };
  171 + duplicateCheck(params).then((res) => {
  172 + if (res.success) {
  173 + callback();
  174 + } else {
  175 + callback('编号已存在');
  176 + }
  177 + })
  178 + },
  179 + }
  180 +}
  181 +</script>
  182 +
  183 +<style scoped></style>
  184 +
  1 +<template>
  2 + <j-modal :title="title" :width="1200" :visible="visible" :maskClosable="false" switchFullscreen @ok="handleOk"
  3 + :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel">
  4 + <tbl-raw-materials-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :excludeIds="excludeIds" />
  5 + </j-modal>
  6 +</template>
  7 +
  8 +<script>
  9 +
  10 +import TblRawMaterialsForm from './TblRawMaterialsForm.vue'
  11 +
  12 +export default {
  13 + name: 'TblRawMaterialsModel',
  14 + components: {
  15 + TblRawMaterialsForm
  16 + },
  17 + data() {
  18 + return {
  19 + title: '',
  20 + width: 800,
  21 + visible: false,
  22 + disableSubmit: false,
  23 + excludeIds: ''
  24 + }
  25 + },
  26 + methods: {
  27 + add() {
  28 + this.excludeIds = '';
  29 + this.visible = true
  30 + this.$nextTick(() => {
  31 + this.$refs.realForm.add();
  32 + })
  33 + },
  34 + edit(record) {
  35 + this.excludeIds = record.partNumber
  36 + this.visible = true
  37 + this.$nextTick(() => {
  38 + this.$refs.realForm.edit(record);
  39 + })
  40 + },
  41 + close() {
  42 + this.$emit('close');
  43 + this.visible = false;
  44 + },
  45 + handleOk() {
  46 + this.$refs.realForm.handleOk();
  47 + },
  48 + submitCallback() {
  49 + this.$emit('ok');
  50 + this.visible = false;
  51 + },
  52 + handleCancel() {
  53 + this.close()
  54 + }
  55 + }
  56 +}
  57 +</script>
  58 +
  59 +<style scoped>
  60 +</style>
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="品名">
  9 + <j-input placeholder="请输入品名" v-model="queryParam.productName"></j-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="采购性质">
  14 + <j-dict-select-tag placeholder="请选择采购性质" v-model="queryParam.buyingClassify" dictCode="buying_classify" />
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  19 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  20 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  21 + <a @click="handleToggleSearch" style="margin-left: 8px">
  22 + {{ toggleSearchStatus ? '收起' : '展开' }}
  23 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  24 + </a>
  25 + </span>
  26 + </a-col>
  27 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  28 + <a-button type="primary" icon="download" @click="handleExportXls('库存报表' + parseTime(new Date().getTime(),'{y}-{m}-{d} {h}:{i}:{s}'))" style="margin-right: 10px;">导出</a-button>
  29 + <a-button type="primary" icon="edit" @click="priceVisible = true">安全库存设置</a-button>
  30 + </a-col>
  31 + </a-row>
  32 + </a-form>
  33 + </div>
  34 + <!-- 查询区域-END -->
  35 +
  36 + <!-- 操作按钮区域 -->
  37 + <div class="table-operator">
  38 + <!-- <a-button type="primary" icon="download" @click="handleExportXls('tbl_inventory')">导出</a-button> -->
  39 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrlBoh" @change="handleImportExcel">
  40 + <a-button type="primary" icon="import">导入更新BOH</a-button>
  41 + </a-upload>
  42 + </div>
  43 +
  44 + <!-- table区域-begin -->
  45 + <div>
  46 + <div style="margin-bottom: 16px;">
  47 +
  48 + </div>
  49 +
  50 + <a-table
  51 + ref="table"
  52 + size="middle"
  53 + :scroll="{x:true}"
  54 + bordered
  55 + rowKey="id"
  56 + :columns="columns"
  57 + :dataSource="dataSource"
  58 + :pagination="ipagination"
  59 + :loading="loading"
  60 + class="j-table-force-nowrap"
  61 + @change="handleTableChange" :rowClassName="tableRowClass">
  62 +
  63 + <template slot="htmlSlot" slot-scope="text">
  64 + <div v-html="text"></div>
  65 + </template>
  66 + <template slot="imgSlot" slot-scope="text,record">
  67 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  68 + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  69 + </template>
  70 + <template slot="fileSlot" slot-scope="text">
  71 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  72 + <a-button
  73 + v-else
  74 + :ghost="true"
  75 + type="primary"
  76 + icon="download"
  77 + size="small"
  78 + @click="downloadFile(text)">
  79 + 下载
  80 + </a-button>
  81 + </template>
  82 +
  83 + <span slot="meterialTypeSlot" slot-scope="text, record">
  84 + <span v-if="text == 1">零件</span>
  85 + <span v-else-if="text == 2">半成品</span>
  86 + <span v-else-if="text == 3">耗材</span>
  87 + <span v-else>劳保</span>
  88 + </span>
  89 + <span slot="action" slot-scope="text, record">
  90 + <a @click="handleDetail(record)">库存明细</a> &nbsp;
  91 + <a @click="updateBoh(record)">更新BOH</a>
  92 + </span>
  93 +
  94 + </a-table>
  95 + </div>
  96 +
  97 + <!-- <tbl-inventory-modal ref="modalForm" @ok="modalFormOk"></tbl-inventory-modal> -->
  98 + <view-depot-stock-modal ref="modalForm" @ok="modalFormOk"></view-depot-stock-modal>
  99 + <template v-if="priceVisible">
  100 + <safety-stock-edit :visible.sync="priceVisible"></safety-stock-edit>
  101 + </template>
  102 +
  103 + <j-modal
  104 + :title="title"
  105 + :width="width"
  106 + :visible="visibleBoh"
  107 + switchFullscreen
  108 + @ok="handleOkBohInfo"
  109 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  110 + @cancel="handleCancelBoh"
  111 + cancelText="关闭">
  112 +
  113 + <a-spin :spinning="confirmLoading">
  114 + <j-form-container :disabled="disabled">
  115 + <a-form-model ref="form" :model="model" slot="detail">
  116 + <a-row>
  117 + <a-col :span="24">
  118 + <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNumber">
  119 + <a-input v-model="model.partNumber" placeholder="请输入编号" disabled="disabled"></a-input>
  120 + </a-form-model-item>
  121 + </a-col>
  122 + <a-col :span="24">
  123 + <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
  124 + <a-input v-model="model.productName" placeholder="请输入品名" disabled="disabled" ></a-input>
  125 + </a-form-model-item>
  126 + </a-col>
  127 + <a-col :span="24">
  128 + <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
  129 + <a-input v-model="model.spec" placeholder="请输入规格" disabled="disabled" ></a-input>
  130 + </a-form-model-item>
  131 + </a-col>
  132 + <a-col :span="24">
  133 + <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
  134 + <a-input v-model="model.type" placeholder="请输入型号" disabled="disabled"></a-input>
  135 + </a-form-model-item>
  136 + </a-col>
  137 + <a-col :span="24">
  138 + <a-form-model-item label="采购性质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buyingClassify">
  139 + <a-input v-model="model.buyingClassify" placeholder="请输入采购性质" disabled="disabled"></a-input>
  140 + </a-form-model-item>
  141 + </a-col>
  142 + <a-col :span="24">
  143 + <a-form-model-item label="类别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialType">
  144 + <a-input v-model="model.meterialType" placeholder="请输入类别" disabled="disabled"></a-input>
  145 + </a-form-model-item>
  146 + </a-col>
  147 + <a-col :span="24">
  148 + <a-form-model-item label="当前库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentInventory">
  149 + <a-input-number v-model="model.currentInventory" placeholder="请输入当前库存量" style="width: 100%" disabled="disabled"/>
  150 + </a-form-model-item>
  151 + </a-col>
  152 + <a-col :span="24">
  153 + <a-form-model-item label="库存BOH" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
  154 + <a-input-number v-model="model.inventoryBoh" placeholder="请输入库存BOH" style="width: 100%" />
  155 + </a-form-model-item>
  156 + </a-col>
  157 + </a-row>
  158 + </a-form-model>
  159 + </j-form-container>
  160 + </a-spin>
  161 +
  162 + </j-modal>
  163 + </a-card>
  164 +</template>
  165 +
  166 +<script>
  167 +
  168 + import '@/assets/less/TableExpand.less'
  169 + import { mixinDevice } from '@/utils/mixin'
  170 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  171 + import TblInventoryModal from './modules/TblInventoryModal'
  172 + import ViewDepotStockModal from '../depot_stock/modules/ViewDepotStockModal'
  173 + import SafetyStockEdit from '../depot_stock/modules/SafetyStockEdit.vue';
  174 + import { getAction ,postAction} from '@/api/manage'
  175 + export default {
  176 + name: 'TblInventoryList',
  177 + mixins:[JeecgListMixin, mixinDevice],
  178 + components: {
  179 + TblInventoryModal,
  180 + SafetyStockEdit,
  181 + ViewDepotStockModal
  182 + },
  183 + data () {
  184 + return {
  185 + confirmLoading: false,
  186 + description: 'tbl_inventory管理页面',
  187 + // 表头
  188 + columns: [
  189 + {
  190 + title: '#',
  191 + dataIndex: '',
  192 + key:'rowIndex',
  193 + width:60,
  194 + align:"center",
  195 + customRender:function (t,r,index) {
  196 + return parseInt(index)+1;
  197 + }
  198 + },
  199 + {
  200 + title: '编号',
  201 + align: "center",
  202 + dataIndex: 'partNumber',
  203 + // customRender: (text, record) => {//根据状态判断字体
  204 + // console.log(this.safetyStock)
  205 + // }
  206 + },
  207 + {
  208 + title:'品名',
  209 + align:"center",
  210 + dataIndex: 'productName'
  211 + },
  212 + {
  213 + title:'规格',
  214 + align:"center",
  215 + dataIndex: 'spec'
  216 + },
  217 + {
  218 + title:'型号',
  219 + align:"center",
  220 + dataIndex: 'type'
  221 + },
  222 + {
  223 + title:'采购性质',
  224 + align:"center",
  225 + dataIndex: 'buyingClassify'
  226 + },
  227 + {
  228 + title:'类别',
  229 + align:"center",
  230 + dataIndex: 'meterialType',
  231 + scopedSlots: { customRender: 'meterialTypeSlot' },
  232 + },
  233 + {
  234 + title:'当前库存量',
  235 + align:"center",
  236 + dataIndex: 'currentInventory'
  237 + },
  238 + {
  239 + title:'BOH',
  240 + align:"center",
  241 + dataIndex: 'inventoryBoh'
  242 + },
  243 + {
  244 + title: '操作',
  245 + dataIndex: 'action',
  246 + align:"center",
  247 + fixed:"right",
  248 + width:147,
  249 + scopedSlots: { customRender: 'action' }
  250 + }
  251 + ],
  252 + url: {
  253 + list: "/depot/tblInventory/list",
  254 + delete: "/depot/tblInventory/delete",
  255 + deleteBatch: "/depot/tblInventory/deleteBatch",
  256 + exportXlsUrl: "/depot/tblInventory/exportXls",
  257 + importExcelUrl: "depot/tblInventory/importExcel",
  258 + importExcelUrlBoh:"depot/tblInventory/importExcelBoh",
  259 + updateBoh:"/depot/tblInventory/updateBoh"
  260 + },
  261 + dictOptions:{},
  262 + superFieldList:[],
  263 + priceVisible: false,
  264 + safetyStock: null,
  265 + model:{},
  266 + visibleBoh:false,
  267 + labelCol: {
  268 + xs: { span: 24 },
  269 + sm: { span: 5 },
  270 + },
  271 + wrapperCol: {
  272 + xs: { span: 24 },
  273 + sm: { span: 16 },
  274 + },
  275 + }
  276 + },
  277 + created() {
  278 + this.getSuperFieldList();
  279 + getAction("/safety/stock/getPrice").then(res => {
  280 + if (res.success) {
  281 + this.safetyStock = res.result.safetyStock;
  282 + }
  283 + })
  284 + },
  285 + computed: {
  286 + importExcelUrl: function () {
  287 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  288 + },
  289 + importExcelUrlBoh: function(){
  290 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlBoh}`;
  291 + },
  292 + },
  293 + methods: {
  294 + tableRowClass(record) {
  295 + if (record.meterialType != "1" && record.meterialType != "2") {
  296 + if (record.currentInventory <= this.safetyStock) {
  297 + return "rowClass";
  298 + } else {
  299 + return "";
  300 + }
  301 + } else {
  302 + return "";
  303 + }
  304 + },
  305 + reSeach() {
  306 + this.loading = true;
  307 + let params = {}
  308 + getAction(this.url.list, params).then(res => {
  309 + this.loading = false;
  310 + if (res.success) {
  311 + this.dataSource = res.result.records;
  312 + }
  313 + })
  314 + },
  315 + updateBoh(recode){
  316 + console.log("..............",recode)
  317 + this.model= {}
  318 + this.model = recode;
  319 + this.visibleBoh = true;
  320 + },
  321 + handleOkBohInfo(){
  322 + this.$refs.form.validate((valid) => {
  323 + if (valid){
  324 + postAction(this.url.updateBoh,this.model).then(res=>{
  325 + this.reSeach();
  326 + if (res.success){
  327 + this.$message.success("更新成功")
  328 + }else {
  329 + this.$message.error(res.message)
  330 + }
  331 + })
  332 + console.log("提交表单内容")
  333 + this.visibleBoh = false
  334 + }
  335 + })
  336 + },
  337 + handleCancelBoh(){
  338 + this.visibleBoh = false;
  339 + this.model = {}
  340 + },
  341 + initDictConfig() {
  342 + },
  343 + getSuperFieldList() {
  344 + let fieldList = [];
  345 + fieldList.push({ type: 'string', value: 'partNumber', text: '编号', dictCode: '' })
  346 + fieldList.push({ type: 'string', value: 'productName', text: '品名', dictCode: '' })
  347 + fieldList.push({ type: 'string', value: 'type', text: '型号', dictCode: '' })
  348 + fieldList.push({ type: 'string', value: 'spec', text: '规格', dictCode: '' })
  349 + fieldList.push({ type: 'string', value: 'buyingClassify', text: '采购性质', dictCode: 'buying_classify' })
  350 + fieldList.push({ type: 'string', value: 'meterialType', text: 'meterialType', dictCode: '' })
  351 + fieldList.push({ type: 'BigDecimal', value: 'operNumber', text: 'operNumber', dictCode: '' })
  352 + this.superFieldList = fieldList
  353 + }
  354 + }
  355 +}
  356 +</script>
  357 +<style >
  358 + .rowClass {
  359 + background-color: red;
  360 + /* color: white; */
  361 +}
  362 +@import '~@assets/less/common.less';
  363 +</style>
@@ -252,6 +252,7 @@ export default { @@ -252,6 +252,7 @@ export default {
252 this.model.spec = res.result.spec 252 this.model.spec = res.result.spec
253 this.model.type = res.result.type 253 this.model.type = res.result.type
254 this.model.buyingClassify = res.result.buyingClassify 254 this.model.buyingClassify = res.result.buyingClassify
  255 + this.model.meterialType = res.result.meterialType
255 this.model.depotType = '入库' 256 this.model.depotType = '入库'
256 this.confirmLoading = false 257 this.confirmLoading = false
257 this.isShow = false 258 this.isShow = false
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="品名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productName">
  8 + <a-input v-model="model.productName" placeholder="请输入品名" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
  13 + <a-input v-model="model.spec" placeholder="请输入规格" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
  18 + <a-input v-model="model.type" placeholder="请输入型号" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + <a-col :span="24">
  22 + <a-form-model-item label="采购性质 M:加工,P:采购" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buyingClassify">
  23 + <a-input v-model="model.buyingClassify" placeholder="请输入采购性质 M:加工,P:采购" ></a-input>
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="类别 1-零件 2-半成品 3-耗材" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialType">
  28 + <a-input v-model="model.meterialType" placeholder="请输入类别 1-零件 2-半成品 3-耗材" ></a-input>
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="当前库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentInventory">
  33 + <a-input-number v-model="model.currentInventory" placeholder="请输入当前库存量" style="width: 100%" />
  34 + </a-form-model-item>
  35 + </a-col>
  36 + <a-col :span="24">
  37 + <a-form-model-item label="初始库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
  38 + <a-input-number v-model="model.inventoryBoh" placeholder="请输入初始库存" style="width: 100%" />
  39 + </a-form-model-item>
  40 + </a-col>
  41 + </a-row>
  42 + </a-form-model>
  43 + </j-form-container>
  44 + </a-spin>
  45 +</template>
  46 +
  47 +<script>
  48 +
  49 + import { httpAction, getAction } from '@/api/manage'
  50 + import { validateDuplicateValue } from '@/utils/util'
  51 +
  52 + export default {
  53 + name: 'TblInventoryForm',
  54 + components: {
  55 + },
  56 + props: {
  57 + //表单禁用
  58 + disabled: {
  59 + type: Boolean,
  60 + default: false,
  61 + required: false
  62 + }
  63 + },
  64 + data () {
  65 + return {
  66 + model:{
  67 + },
  68 + labelCol: {
  69 + xs: { span: 24 },
  70 + sm: { span: 5 },
  71 + },
  72 + wrapperCol: {
  73 + xs: { span: 24 },
  74 + sm: { span: 16 },
  75 + },
  76 + confirmLoading: false,
  77 + validatorRules: {
  78 + },
  79 + url: {
  80 + add: "/org.jeecg.modules.erp.depot_stock/tblInventory/add",
  81 + edit: "/org.jeecg.modules.erp.depot_stock/tblInventory/edit",
  82 + queryById: "/org.jeecg.modules.erp.depot_stock/tblInventory/queryById"
  83 + }
  84 + }
  85 + },
  86 + computed: {
  87 + formDisabled(){
  88 + return this.disabled
  89 + },
  90 + },
  91 + created () {
  92 + //备份model原始值
  93 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  94 + },
  95 + methods: {
  96 + add () {
  97 + this.edit(this.modelDefault);
  98 + },
  99 + edit (record) {
  100 + this.model = Object.assign({}, record);
  101 + this.visible = true;
  102 + },
  103 + submitForm () {
  104 + const that = this;
  105 + // 触发表单验证
  106 + this.$refs.form.validate(valid => {
  107 + if (valid) {
  108 + that.confirmLoading = true;
  109 + let httpurl = '';
  110 + let method = '';
  111 + if(!this.model.id){
  112 + httpurl+=this.url.add;
  113 + method = 'post';
  114 + }else{
  115 + httpurl+=this.url.edit;
  116 + method = 'put';
  117 + }
  118 + httpAction(httpurl,this.model,method).then((res)=>{
  119 + if(res.success){
  120 + that.$message.success(res.message);
  121 + that.$emit('ok');
  122 + }else{
  123 + that.$message.warning(res.message);
  124 + }
  125 + }).finally(() => {
  126 + that.confirmLoading = false;
  127 + })
  128 + }
  129 +
  130 + })
  131 + },
  132 + }
  133 + }
  134 +</script>
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <tbl-inventory-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tbl-inventory-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import TblInventoryForm from './TblInventoryForm'
  21 +
  22 + export default {
  23 + name: 'TblInventoryModal',
  24 + components: {
  25 + TblInventoryForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <tbl-inventory-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tbl-inventory-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import TblInventoryForm from './TblInventoryForm'
  18 + export default {
  19 + name: 'TblInventoryModal',
  20 + components: {
  21 + TblInventoryForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
@@ -61,6 +61,7 @@ @@ -61,6 +61,7 @@
61 61
62 <span slot="action" slot-scope="text, record"> 62 <span slot="action" slot-scope="text, record">
63 <a @click="handleDetail(record)">库存明细</a> 63 <a @click="handleDetail(record)">库存明细</a>
  64 + <!-- <a @click="updateBoh(record)">更新BOH</a> -->
64 </span> 65 </span>
65 </a-table> 66 </a-table>
66 </div> 67 </div>
@@ -92,16 +93,16 @@ export default { @@ -92,16 +93,16 @@ export default {
92 description: 'view_depot_stock管理页面', 93 description: 'view_depot_stock管理页面',
93 // 表头 94 // 表头
94 columns: [ 95 columns: [
95 - {  
96 - title: '#',  
97 - dataIndex: '',  
98 - key: 'rowIndex',  
99 - width: 60,  
100 - align: "center",  
101 - customRender: function (t, r, index) {  
102 - return parseInt(index) + 1;  
103 - }  
104 - }, 96 + // {
  97 + // title: '#',
  98 + // dataIndex: '',
  99 + // key: 'rowIndex',
  100 + // width: 60,
  101 + // align: "center",
  102 + // customRender: function (t, r, index) {
  103 + // return parseInt(index) + 1;
  104 + // }
  105 + // },
105 { 106 {
106 title: '编号', 107 title: '编号',
107 align: "center", 108 align: "center",
@@ -110,7 +111,7 @@ export default { @@ -110,7 +111,7 @@ export default {
110 // console.log(this.safetyStock) 111 // console.log(this.safetyStock)
111 // } 112 // }
112 }, 113 },
113 - { 114 + {
114 title: '品名', 115 title: '品名',
115 align: "center", 116 align: "center",
116 dataIndex: 'productName' 117 dataIndex: 'productName'
@@ -160,7 +161,9 @@ export default { @@ -160,7 +161,9 @@ export default {
160 dictOptions: {}, 161 dictOptions: {},
161 superFieldList: [], 162 superFieldList: [],
162 priceVisible: false, 163 priceVisible: false,
163 - safetyStock: null 164 + safetyStock: null,
  165 + model:{},
  166 + visibleBoh:false
164 } 167 }
165 }, 168 },
166 created() { 169 created() {
@@ -189,6 +192,13 @@ export default { @@ -189,6 +192,13 @@ export default {
189 return ""; 192 return "";
190 } 193 }
191 }, 194 },
  195 + // updateBoh(recode){
  196 + // console.log("..............",recode)
  197 + // this.model= {}
  198 + // this.model = recode;
  199 + // // this.model.materialDescription = recode.materialReview;
  200 + // this.visibleBoh = true;
  201 + // },
192 initDictConfig() { 202 initDictConfig() {
193 }, 203 },
194 getSuperFieldList() { 204 getSuperFieldList() {
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
17 <a-select-option value="">请选择</a-select-option> 17 <a-select-option value="">请选择</a-select-option>
18 <a-select-option value="入库">入库</a-select-option> 18 <a-select-option value="入库">入库</a-select-option>
19 <a-select-option value="出库">出库</a-select-option> 19 <a-select-option value="出库">出库</a-select-option>
  20 + <a-select-option value="更新">更新</a-select-option>
20 </a-select> 21 </a-select>
21 </a-form-item> 22 </a-form-item>
22 </a-col> 23 </a-col>
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <div class="align-colon">
  6 + <p style="margin-bottom: -5px; margin-left: 50px">
  7 + <span>订单号:</span
  8 + ><a-input v-model="model.orderId" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  9 + </p>
  10 + <p style="margin-bottom: -5px; margin-left: 50px">
  11 + <span>订货单位:</span
  12 + ><a-input v-model="model.orderCompany" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  13 + </p>
  14 + <p style="margin-bottom: -5px; margin-left: 50px">
  15 + <span>工作令:</span
  16 + ><a-input v-model="model.workOrder" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  17 + </p>
  18 + <p style="margin-bottom: -5px; margin-left: 50px">
  19 + <span>产品名称:</span
  20 + ><a-input v-model="model.productName" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  21 + </p>
  22 + <p style="margin-bottom: -5px; margin-left: 50px">
  23 + <span>产品类型:</span
  24 + ><a-input v-model="this.productType" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  25 + </p>
  26 + <p style="margin-bottom: -5px; margin-left: 50px">
  27 + <span>任务下达时间:</span
  28 + ><a-input v-model="model.orderDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  29 + </p>
  30 + <p style="margin-bottom: -5px; margin-left: 50px">
  31 + <span>派工时间:</span
  32 + ><a-input v-model="model.dispatchDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  33 + </p>
  34 + <p style="margin-bottom: -5px; margin-left: 50px">
  35 + <span>交货时间:</span
  36 + ><a-input v-model="model.deliveryDate" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  37 + </p>
  38 + <p style="margin-bottom: -5px; margin-left: 50px">
  39 + <span>数量(套):</span
  40 + ><a-input v-model="model.quantity" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  41 + </p>
  42 + <p style="margin-bottom: -5px; margin-left: 50px">
  43 + <span>总工时:</span
  44 + ><a-input v-model="model.totalWorkingHours" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  45 + </p>
  46 + <p style="margin-left: 50px">
  47 + <span>已派发工时:</span><a-input v-model="model.dispatchedWorkingHours" style="width: 200px; border: 0px; font-weight: bold"></a-input>
  48 + </p>
  49 + <!-- 图片容器 -->
  50 +
  51 + <!-- <div class="image-container-wrapper">
  52 + <div style="display: inline-block; width: 45%">
  53 + <div class="show">
  54 + <img :src="getImgView(show)" :preview="num" alt="" height="100px" />
  55 + </div>
  56 + <div class="imgBox">
  57 + <div
  58 + :class="[num == index ? 'borderShow' : '']"
  59 + v-for="(item, index) of picList"
  60 + :key="index"
  61 + @click="onImg(index)"
  62 + >
  63 + <img :src="getImgView(item)" height="25px" alt="" style="margin-left: 20px" />
  64 + </div>
  65 + </div>
  66 + </div>
  67 + </div> -->
  68 + <div image-container-wrapper>
  69 + <div v-if="model.pics != null" style="margin-top: 50px;">
  70 + <a-carousel arrows>
  71 + <div
  72 + slot="prevArrow"
  73 + slot-scope="props"
  74 + class="custom-slick-arrow"
  75 + style="left: 10px;zIndex: 1"
  76 + >
  77 + <a-icon type="left-circle" />
  78 + </div>
  79 + <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
  80 + <a-icon type="right-circle" />
  81 + </div>
  82 + <div v-for="(item, index) in picList" :key="index" @click="onImg(index)">
  83 + <img :src="getImgView(item)" alt="" class="imgg" :preview="num"/>
  84 + </div>
  85 + </a-carousel>
  86 + <div class="tipCss">设计图</div>
  87 + </div>
  88 + </div>
  89 + </div>
  90 + <a-table
  91 + ref="table"
  92 + size="middle"
  93 + bordered
  94 + rowKey="id"
  95 + class="j-table-force-nowrap"
  96 + :scroll="{ x: true }"
  97 + :columns="columns"
  98 + :dataSource="res"
  99 + :pagination="false"
  100 + >
  101 + </a-table>
  102 + </a-form-model>
  103 + </j-form-container>
  104 + </a-spin>
  105 +</template>
  106 +
  107 +<script>
  108 +import { httpAction, getAction } from '@/api/manage'
  109 +import { validateDuplicateValue } from '@/utils/util'
  110 +import Axios from 'axios'
  111 +import { queryBynumber, querygx } from '../../../api/manage'
  112 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  113 +
  114 +export default {
  115 + name: 'TblProductionPlanForm',
  116 + mixins: [JeecgListMixin],
  117 + components: {},
  118 + props: {
  119 + //表单禁用
  120 + disabled: {
  121 + type: Boolean,
  122 + default: false,
  123 + required: false,
  124 + },
  125 + },
  126 + data() {
  127 + return {
  128 + productType:'',
  129 + picList: '',
  130 + show: '',
  131 + num: 0,
  132 + imageSrc: '',
  133 + files: '',
  134 + model: {},
  135 + res: [],
  136 + columns: [
  137 + {
  138 + title: '工序',
  139 + align: 'center',
  140 + dataIndex: 'workingProcedure',
  141 + },
  142 + {
  143 + title: '承接人',
  144 + align: 'center',
  145 + dataIndex: 'undertaker',
  146 + },
  147 + {
  148 + title: '工时',
  149 + align: 'center',
  150 + dataIndex: 'workHours',
  151 + },
  152 +
  153 + {
  154 + title: '派发时间',
  155 + align: 'center',
  156 + dataIndex: 'dispatchTime',
  157 + customRender: function (text) {
  158 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  159 + },
  160 + },
  161 + {
  162 + title: '派发人',
  163 + align: 'center',
  164 + dataIndex: 'dispatchRen',
  165 + },
  166 + {
  167 + title: '验收时间',
  168 + align: 'center',
  169 + dataIndex: 'yanTime',
  170 + customRender: function (text) {
  171 + return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
  172 + },
  173 + },
  174 + {
  175 + title: '验收人',
  176 + align: 'center',
  177 + dataIndex: 'yanRen',
  178 + },
  179 + {
  180 + title: '验收结果',
  181 + align: 'center',
  182 + dataIndex: 'yanResult',
  183 + },
  184 + {
  185 + title: '备注',
  186 + align: 'center',
  187 + dataIndex: 'notes',
  188 + },
  189 + ],
  190 + labelCol: {
  191 + xs: { span: 24 },
  192 + sm: { span: 5 },
  193 + },
  194 + wrapperCol: {
  195 + xs: { span: 24 },
  196 + sm: { span: 16 },
  197 + },
  198 + confirmLoading: false,
  199 + validatorRules: {
  200 + pai: [{ required: true, message: '请输入已派发工时!' }],
  201 + totalWork: [{ required: true, message: '请输入总工时!' }],
  202 + deliveryTime: [{ required: true, message: '请输入交货时间!' }],
  203 + dispatchTime: [{ required: true, message: '请输入派工时间!' }],
  204 + workTime: [{ required: true, message: '请输入任务下达时间!' }],
  205 + productType: [{ required: true, message: '请输入产品类型!' }],
  206 + productName: [{ required: true, message: '请输入产品名称!' }],
  207 + workOrder: [{ required: true, message: '请输入工作令!' }],
  208 + danwei: [{ required: true, message: '请输入订货单位!' }],
  209 + orderNumber: [{ required: true, message: '请输入订单号!' }],
  210 + num: [{ required: true, message: '请输入数量(套)!' }],
  211 + },
  212 + url: {
  213 + add: '/production/tblProductionPlan/add',
  214 + edit: '/production/tblProductionPlan/edit',
  215 + queryById: '/production/tblProductionPlan/queryById',
  216 + queryBynumber: '/production/tblProductionPlan/queryBynumber',
  217 + querygx: '/production/tblProductionPlan/querygx',
  218 + list: "/order_form/tblOrderForm/list",
  219 + queryByType: '/production/tblProductTypeGongxu/queryByType',
  220 + },
  221 + }
  222 + },
  223 + computed: {
  224 + formDisabled() {
  225 + return this.disabled
  226 + },
  227 + },
  228 + created() {
  229 + //备份model原始值
  230 + this.modelDefault = JSON.parse(JSON.stringify(this.model))
  231 + },
  232 + methods: {
  233 + onImg(e) {
  234 + this.show = this.picList[e]
  235 + this.num = e
  236 + },
  237 + querygx(orderId, productType) {
  238 + if(this.model.productType === '接地'){
  239 + this.model.productType='JD'
  240 + }else if(this.model.productType === '线槽'){
  241 + this.model.productType= 'XC'
  242 + }else if(this.model.productType === '卡子'){
  243 + this.model.productType= 'QZ'
  244 + }else if(this.model.productType === '司机室'){
  245 + this.model.productType= 'SJ'
  246 + }else if(this.model.productType === '柜、箱、盒'){
  247 + this.model.productType= 'GX'
  248 + }else if(this.model.productType === '附属钢'){
  249 + this.model.productType= 'FS'
  250 + }
  251 + // gongxuList(this.url.queryByType, { productTypeId: productType }).then((ress) => {
  252 + // if(ress){
  253 +
  254 + // }
  255 + // })
  256 + querygx(this.url.querygx, this.model).then((res) => {
  257 + console.log('工序订单号:', orderId)
  258 + console.log('工序产品类型:', productType)
  259 + console.log('工序查询:', res)
  260 + this.res = res.result
  261 + })
  262 + },
  263 + queryBynumber(orderId) {
  264 + console.log('1订单号:', orderId)
  265 + if(this.model.productType === '接地'){
  266 + this.productType='接地'
  267 + }else if(this.model.productType === '线槽'){
  268 + this.productType= '线槽'
  269 + }else if(this.model.productType === '卡子'){
  270 + this.productType= '卡子'
  271 + }else if(this.model.productType === '司机室'){
  272 + this.productType= '司机室'
  273 + }else if(this.model.productType === '柜、箱、盒'){
  274 + this.productType= '柜、箱、盒'
  275 + }else if(this.model.productType === '附属钢'){
  276 + this.productType= '附属钢'
  277 + }
  278 + queryBynumber(this.url.queryBynumber, { orderId: orderId }).then((res) => {
  279 +
  280 + if (res.result) {
  281 + const result = res.result;
  282 + if (result.designPic) {
  283 + this.imageSrc = result.designPic;
  284 + this.picList = result.designPic.split(',');
  285 + this.show = this.picList[0];
  286 + }
  287 + if (result.designFile) {
  288 + this.designFile = result.designFile;
  289 + console.log('files:', this.designFile);
  290 + }
  291 + } else {
  292 + console.log('Response result or required properties are missing.');
  293 + }
  294 + })
  295 + .catch((error) => {
  296 + console.error('Error while fetching data:', error);
  297 + });
  298 + },
  299 + add() {
  300 + this.edit(this.modelDefault)
  301 + },
  302 + edit(record) {
  303 + this.model = Object.assign({}, record)
  304 + if(this.model.productType === 'JD'){
  305 + this.model.productType='接地'
  306 + }else if(this.model.productType === 'XC'){
  307 + this.model.productType= '线槽'
  308 + }else if(this.model.productType === 'QZ'){
  309 + this.model.productType= '卡子'
  310 + }else if(this.model.productType === 'SJ'){
  311 + this.model.productType= '司机室'
  312 + }else if(this.model.productType === 'GX'){
  313 + this.model.productType= '柜、箱、盒'
  314 + }else if(this.model.productType === 'FS'){
  315 + this.model.productType= '附属钢'
  316 + }
  317 + this.visible = true
  318 + },
  319 +
  320 + submitForm() {
  321 + const that = this
  322 + // 触发表单验证
  323 + this.$refs.form.validate((valid) => {
  324 + if (valid) {
  325 + that.confirmLoading = true
  326 + let httpurl = ''
  327 + let method = ''
  328 + if (!this.model.id) {
  329 + httpurl += this.url.add
  330 + method = 'post'
  331 + } else {
  332 + httpurl += this.url.edit
  333 + method = 'put'
  334 + }
  335 + httpAction(httpurl, this.model, method)
  336 + .then((res) => {
  337 + if (res.success) {
  338 + that.$message.success(res.message)
  339 + that.$emit('ok')
  340 + } else {
  341 + that.$message.warning(res.message)
  342 + }
  343 + })
  344 + .finally(() => {
  345 + that.confirmLoading = false
  346 + })
  347 + }
  348 + })
  349 + },
  350 + },
  351 +}
  352 +</script>
  353 +
  354 +<style scoped>
  355 +
  356 +.ant-carousel >>> .slick-slide {
  357 + text-align: center;
  358 + height: 200px;
  359 + line-height: 200px;
  360 + /* background: #e7e7e8d2; */
  361 + overflow: hidden;
  362 +}
  363 +
  364 +.ant-carousel >>> .custom-slick-arrow {
  365 + width: 25px;
  366 + height: 25px;
  367 + font-size: 25px;
  368 + color: #cbc9c9;
  369 + /* background-color: rgba(31, 45, 61, 0.11); */
  370 + opacity: 0.3;
  371 +}
  372 +.ant-carousel >>> .custom-slick-arrow:before {
  373 + display: none;
  374 +}
  375 +.ant-carousel >>> .custom-slick-arrow:hover {
  376 + opacity: 0.5;
  377 +}
  378 +
  379 +.ant-carousel >>> .slick-slide h3 {
  380 + color: #cbc9c9;
  381 +}
  382 +.imgg{
  383 + /* width: 200px; */
  384 + height: 160px;
  385 + margin: auto
  386 +}
  387 +.imgg:hover{
  388 + cursor: pointer;
  389 + }
  390 + .align-colon{
  391 + display:inline-block;width:50%;margin: auto;
  392 + }
  393 +.align-colon p {
  394 + display: flex;
  395 + align-items: center;
  396 +}
  397 +
  398 +.align-colon p span {
  399 + width: 100px; /* 固定文本部分的宽度 */
  400 + text-align: right; /* 文本右对齐 */
  401 + margin-right: -0px; /* 调整冒号后的空白间距 */
  402 + font-weight: bold; /* 将文本加粗 */
  403 +}
  404 +.imgDiv{
  405 + display:inline-block;
  406 + width:40%;
  407 +}
  408 +/* 图片容器及其包裹器的样式 */
  409 +/* .image-container-wrapper {
  410 + width: 50%; 将图片容器包裹器宽度设置为一半
  411 + float: right; 右浮动
  412 + margin-top: -300px; 调整顶部外边距以与其他内容对齐
  413 +} */
  414 +.imgBox {
  415 + display: flex;
  416 +}
  417 +
  418 +.imgBox img {
  419 + width: 50px;
  420 + height: 50px;
  421 + margin: 10px;
  422 +}
  423 +.show img{
  424 + margin-bottom: 10px;
  425 + height: 200px;
  426 + width: 200px;
  427 +}
  428 +
  429 +.imgBox div {
  430 + margin: 5px;
  431 +}
  432 +
  433 +.borderShow {
  434 + border: 2px solid rgb(141, 134, 134);
  435 +}
  436 +
  437 +.image-container {
  438 + margin-bottom: -10px; /* 图片容器下边距 */
  439 +}
  440 +.custom-image {
  441 + width: 500px; /* 设置图片宽度为200像素 */
  442 + height: auto; /* 自动调整高度以保持宽高比 */
  443 +}
  444 +</style>
@@ -4,9 +4,9 @@ @@ -4,9 +4,9 @@
4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> 4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
5 <a-row> 5 <a-row>
6 <a-col :span="12"> 6 <a-col :span="12">
7 - <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode"> 7 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
8 <a-input 8 <a-input
9 - v-model="model.meterialCode" 9 + v-model="model.materialCode"
10 placeholder="请输入物料编码" 10 placeholder="请输入物料编码"
11 readonly 11 readonly
12 ></a-input> 12 ></a-input>
@@ -26,9 +26,9 @@ @@ -26,9 +26,9 @@
26 <!-- <a >查询</a>--> 26 <!-- <a >查询</a>-->
27 <!-- </a-col>--> 27 <!-- </a-col>-->
28 <a-col :span="12"> 28 <a-col :span="12">
29 - <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview"> 29 + <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
30 <a-input 30 <a-input
31 - v-model="model.meterialReview" 31 + v-model="model.materialReview"
32 placeholder="请输入物料长描述" 32 placeholder="请输入物料长描述"
33 33
34 ></a-input> 34 ></a-input>
@@ -144,7 +144,7 @@ export default { @@ -144,7 +144,7 @@ export default {
144 components: {}, 144 components: {},
145 props: { 145 props: {
146 materialCode: String, //物料编码 146 materialCode: String, //物料编码
147 - meterialReview: String, //物料长描述 147 + materialReview: String, //物料长描述
148 unit: String, //计量单位 148 unit: String, //计量单位
149 brand: String, //品牌 149 brand: String, //品牌
150 //表单禁用 150 //表单禁用
@@ -173,9 +173,9 @@ export default { @@ -173,9 +173,9 @@ export default {
173 sm: { span: 16 }, 173 sm: { span: 16 },
174 }, 174 },
175 validatorRules: { 175 validatorRules: {
176 - meterialCode: [{ required: true, message: '请输入物料编码!' },], 176 + materialCode: [{ required: true, message: '请输入物料编码!' },],
177 hth: [{ required: true, message: '请输入合同/订单号!' },], 177 hth: [{ required: true, message: '请输入合同/订单号!' },],
178 - meterialReview: [{ required: true, message: '请输入物料长描述!' },], 178 + materialReview: [{ required: true, message: '请输入物料长描述!' },],
179 wldh: [{ required: true, message: '请输入物流单号!' },], 179 wldh: [{ required: true, message: '请输入物流单号!' },],
180 unit: [{ required: true, message: '请输入单位!' },], 180 unit: [{ required: true, message: '请输入单位!' },],
181 iszt: [{ required: true, message: '请选择是否在途!' },], 181 iszt: [{ required: true, message: '请选择是否在途!' },],
@@ -194,8 +194,8 @@ export default { @@ -194,8 +194,8 @@ export default {
194 }, 194 },
195 }, 195 },
196 created() { 196 created() {
197 - this.model.meterialCode = this.materialCode  
198 - this.model.meterialReview = this.meterialReview 197 + this.model.materialCode = this.materialCode
  198 + this.model.materialReview = this.materialReview
199 this.model.unit = this.unit 199 this.model.unit = this.unit
200 this.model.brand = this.brand 200 this.model.brand = this.brand
201 }, 201 },
@@ -44,6 +44,16 @@ @@ -44,6 +44,16 @@
44 <a-button @click="handleInventoryIn" type="primary" >入库记录</a-button> 44 <a-button @click="handleInventoryIn" type="primary" >入库记录</a-button>
45 <a-button @click="handleInventoryOut" type="primary" >出库记录</a-button> 45 <a-button @click="handleInventoryOut" type="primary" >出库记录</a-button>
46 <a-button @click="handleInventoryDefective" type="primary" >不良品库</a-button> 46 <a-button @click="handleInventoryDefective" type="primary" >不良品库</a-button>
  47 + <a-upload
  48 + name="file"
  49 + :showUploadList="false"
  50 + :multiple="false"
  51 + :headers="tokenHeader"
  52 + :action="importExcelUrlBoh"
  53 + @change="handleImportExcel"
  54 + >
  55 + <a-button type="primary" icon="import">更新BOH</a-button>
  56 + </a-upload>
47 <!-- 高级查询区域 --> 57 <!-- 高级查询区域 -->
48 <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> --> 58 <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
49 <a-dropdown v-if="selectedRowKeys.length > 0"> 59 <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -95,9 +105,10 @@ @@ -95,9 +105,10 @@
95 </template> 105 </template>
96 106
97 <span slot="action" slot-scope="text, record"> 107 <span slot="action" slot-scope="text, record">
98 - <a @click="handleInventoryInfoIn(record)">入库</a> &nbsp  
99 - <a @click="handleInventoryInfoOut(record)">出库</a> &nbsp  
100 - <a @click="handleInventoryInfo(record)">库存明细</a> 108 + <a @click="handleInventoryInfoIn(record)">入库</a> &nbsp;
  109 + <a @click="handleInventoryInfoOut(record)">出库</a> &nbsp;
  110 + <a @click="handleInventoryInfo(record)">库存明细</a>&nbsp;
  111 + <a @click="updateInventoryBoh(record)">更新BOH</a>
101 </span> 112 </span>
102 113
103 </a-table> 114 </a-table>
@@ -145,7 +156,7 @@ @@ -145,7 +156,7 @@
145 @ok="handleCancelInfo" 156 @ok="handleCancelInfo"
146 @cancel="handleCancelInfo" 157 @cancel="handleCancelInfo"
147 cancelText="关闭"> 158 cancelText="关闭">
148 - <TblTradeInventoryInfoList :materialCode="meterialCode"></TblTradeInventoryInfoList> 159 + <TblTradeInventoryInfoList :materialCode="materialCode"></TblTradeInventoryInfoList>
149 </j-modal> 160 </j-modal>
150 161
151 162
@@ -175,9 +186,9 @@ @@ -175,9 +186,9 @@
175 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> 186 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
176 <a-row> 187 <a-row>
177 <a-col :span="12"> 188 <a-col :span="12">
178 - <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode"> 189 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
179 <a-input 190 <a-input
180 - v-model="model.meterialCode" 191 + v-model="model.materialCode"
181 placeholder="请输入物料编码" 192 placeholder="请输入物料编码"
182 disabled="disabled" 193 disabled="disabled"
183 ></a-input> 194 ></a-input>
@@ -197,9 +208,9 @@ @@ -197,9 +208,9 @@
197 <!-- <a >查询</a>--> 208 <!-- <a >查询</a>-->
198 <!-- </a-col>--> 209 <!-- </a-col>-->
199 <a-col :span="12"> 210 <a-col :span="12">
200 - <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview"> 211 + <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
201 <a-input 212 <a-input
202 - v-model="model.meterialReview" 213 + v-model="model.materialReview"
203 placeholder="请输入物料长描述" 214 placeholder="请输入物料长描述"
204 disabled="disabled" 215 disabled="disabled"
205 ></a-input> 216 ></a-input>
@@ -323,9 +334,9 @@ @@ -323,9 +334,9 @@
323 <a-form-model ref="form" :model="model2" :rules="validatorOutRules" slot="detail"> 334 <a-form-model ref="form" :model="model2" :rules="validatorOutRules" slot="detail">
324 <a-row> 335 <a-row>
325 <a-col :span="12"> 336 <a-col :span="12">
326 - <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode"> 337 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
327 <a-input 338 <a-input
328 - v-model="model2.meterialCode" 339 + v-model="model2.materialCode"
329 placeholder="请输入物料编码" 340 placeholder="请输入物料编码"
330 disabled="disabled" 341 disabled="disabled"
331 ></a-input> 342 ></a-input>
@@ -342,9 +353,9 @@ @@ -342,9 +353,9 @@
342 </a-form-model-item> 353 </a-form-model-item>
343 </a-col> 354 </a-col>
344 <a-col :span="12"> 355 <a-col :span="12">
345 - <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview"> 356 + <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
346 <a-input 357 <a-input
347 - v-model="model2.meterialReview" 358 + v-model="model2.materialReview"
348 placeholder="请输入物料长描述" 359 placeholder="请输入物料长描述"
349 disabled="disabled" 360 disabled="disabled"
350 ></a-input> 361 ></a-input>
@@ -422,6 +433,82 @@ @@ -422,6 +433,82 @@
422 </a-spin> 433 </a-spin>
423 434
424 </j-modal> 435 </j-modal>
  436 + <j-modal
  437 + :title="title"
  438 + :width="width"
  439 + :visible="visibleBoh"
  440 + switchFullscreen
  441 + @ok="handleOkBohInfo"
  442 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  443 + @cancel="handleCancelBoh"
  444 + cancelText="关闭">
  445 +
  446 + <a-spin :spinning="confirmLoading">
  447 + <j-form-container :disabled="formDisabled">
  448 + <a-form-model ref="form" :model="model2" :rules="validatorRules" slot="detail">
  449 + <a-row>
  450 + <a-col :span="12">
  451 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  452 + <a-input
  453 + v-model="model2.materialCode"
  454 + placeholder="请输入物料编码"
  455 + disabled="disabled"
  456 + ></a-input>
  457 + </a-form-model-item>
  458 + </a-col>
  459 + <a-col :span="12">
  460 + <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
  461 + <a-input
  462 + v-model="model2.materialReview"
  463 + placeholder="请输入物料长描述"
  464 + disabled="disabled"
  465 + ></a-input>
  466 + </a-form-model-item>
  467 + </a-col>
  468 + <a-col :span="12">
  469 + <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
  470 + <a-input
  471 + v-model="model2.unit"
  472 + placeholder="请输入单位"
  473 + disabled="disabled"
  474 + ></a-input>
  475 + </a-form-model-item>
  476 + </a-col>
  477 + <a-col :span="12">
  478 + <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
  479 + <a-input
  480 + v-model="model2.brand"
  481 + placeholder="请输入品牌"
  482 + disabled="disabled"
  483 + ></a-input>
  484 + </a-form-model-item>
  485 + </a-col>
  486 + <a-col :span="12">
  487 + <a-form-model-item label="实际库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="actualInventory">
  488 + <a-input
  489 + v-model="model2.actualInventory"
  490 + placeholder="请输入入库数量"
  491 + disabled="disabled"
  492 + ></a-input>
  493 + </a-form-model-item>
  494 + </a-col>
  495 + <a-col :span="12">
  496 + <a-form-model-item label="BOH" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
  497 + <a-input
  498 + v-model="model2.inventoryBoh"
  499 + placeholder="请输入BOH"
  500 + ></a-input>
  501 + </a-form-model-item>
  502 + </a-col>
  503 + </a-row>
  504 +
  505 + </a-form-model>
  506 + </j-form-container>
  507 + </a-spin>
  508 +
  509 + </j-modal>
  510 +
  511 +
425 </a-card> 512 </a-card>
426 </template> 513 </template>
427 514
@@ -471,12 +558,12 @@ @@ -471,12 +558,12 @@
471 { 558 {
472 title:'物料编码', 559 title:'物料编码',
473 align:"center", 560 align:"center",
474 - dataIndex: 'meterialCode' 561 + dataIndex: 'materialCode'
475 }, 562 },
476 { 563 {
477 title:'物料长描述', 564 title:'物料长描述',
478 align:"center", 565 align:"center",
479 - dataIndex: 'meterialReview' 566 + dataIndex: 'materialReview'
480 }, 567 },
481 { 568 {
482 title:'计量单位', 569 title:'计量单位',
@@ -489,6 +576,11 @@ @@ -489,6 +576,11 @@
489 dataIndex: 'brand' 576 dataIndex: 'brand'
490 }, 577 },
491 { 578 {
  579 + title:'BOH',
  580 + align:"center",
  581 + dataIndex: 'inventoryBoh'
  582 + },
  583 + {
492 title:'实际库存量', 584 title:'实际库存量',
493 align:"center", 585 align:"center",
494 dataIndex: 'actualInventory' 586 dataIndex: 'actualInventory'
@@ -498,11 +590,11 @@ @@ -498,11 +590,11 @@
498 align:"center", 590 align:"center",
499 dataIndex: 'quantityInTransit' 591 dataIndex: 'quantityInTransit'
500 }, 592 },
501 - {  
502 - title:'总数量',  
503 - align:"center",  
504 - dataIndex: 'totalQuantity'  
505 - }, 593 + // {
  594 + // title:'总数量',
  595 + // align:"center",
  596 + // dataIndex: 'totalQuantity'
  597 + // },
506 // { 598 // {
507 // title:'单价(不含税,元)', 599 // title:'单价(不含税,元)',
508 // align:"center", 600 // align:"center",
@@ -557,6 +649,8 @@ @@ -557,6 +649,8 @@
557 deleteBatch: "/trade/tblTradeInventory/deleteBatch", 649 deleteBatch: "/trade/tblTradeInventory/deleteBatch",
558 exportXlsUrl: "/trade/tblTradeInventory/exportXls", 650 exportXlsUrl: "/trade/tblTradeInventory/exportXls",
559 importExcelUrl: "trade/tblTradeInventory/importExcel", 651 importExcelUrl: "trade/tblTradeInventory/importExcel",
  652 + importExcelUrlBoh: 'trade/tblTradeInventory/importExcelBoh',
  653 + updateBoh: '/trade/tblTradeInventory/updateBoh'
560 654
561 }, 655 },
562 dictOptions:{}, 656 dictOptions:{},
@@ -569,8 +663,8 @@ @@ -569,8 +663,8 @@
569 model2: { 663 model2: {
570 664
571 }, 665 },
572 - meterialCode:'',  
573 - meterialReview:'', 666 + materialCode:'',
  667 + materialReview:'',
574 unit:'', 668 unit:'',
575 brand:'', 669 brand:'',
576 width:896, 670 width:896,
@@ -581,6 +675,7 @@ @@ -581,6 +675,7 @@
581 visibleInfo:false, 675 visibleInfo:false,
582 visibleInfoIn:false, 676 visibleInfoIn:false,
583 visibleInfoOut:false, 677 visibleInfoOut:false,
  678 + visibleBoh:false,
584 disableSubmit: false, 679 disableSubmit: false,
585 title: '入库', 680 title: '入库',
586 titleOut: '出库', 681 titleOut: '出库',
@@ -593,9 +688,9 @@ @@ -593,9 +688,9 @@
593 sm: { span: 16 }, 688 sm: { span: 16 },
594 }, 689 },
595 validatorRules: { 690 validatorRules: {
596 - meterialCode: [{ required: true, message: '请输入物料编码!' },], 691 + materialCode: [{ required: true, message: '请输入物料编码!' },],
597 hth: [{ required: true, message: '请输入合同/订单号!' },], 692 hth: [{ required: true, message: '请输入合同/订单号!' },],
598 - meterialReview: [{ required: true, message: '请输入物料长描述!' },], 693 + materialReview: [{ required: true, message: '请输入物料长描述!' },],
599 wldh: [{ required: true, message: '请输入物流单号!' },], 694 wldh: [{ required: true, message: '请输入物流单号!' },],
600 unit: [{ required: true, message: '请输入单位!' },], 695 unit: [{ required: true, message: '请输入单位!' },],
601 // iszt: [{ required: true, message: '请选择是否在途!' },], 696 // iszt: [{ required: true, message: '请选择是否在途!' },],
@@ -606,9 +701,9 @@ @@ -606,9 +701,9 @@
606 operator: [{ required: true, message: '请输入采购员!' },], 701 operator: [{ required: true, message: '请输入采购员!' },],
607 }, 702 },
608 validatorOutRules: { 703 validatorOutRules: {
609 - meterialCode: [{ required: true, message: '请输入物料编码!' },], 704 + materialCode: [{ required: true, message: '请输入物料编码!' },],
610 expressDeliveryNumber: [{ required: true, message: '请输入供应商合同号/订单号!' },], 705 expressDeliveryNumber: [{ required: true, message: '请输入供应商合同号/订单号!' },],
611 - meterialReview: [{ required: true, message: '请输入物料长描述!' },], 706 + materialReview: [{ required: true, message: '请输入物料长描述!' },],
612 deliveryContractNumber: [{ required: true, message: '请输入中标合同编号!' },], 707 deliveryContractNumber: [{ required: true, message: '请输入中标合同编号!' },],
613 unit: [{ required: true, message: '请输入单位!' },], 708 unit: [{ required: true, message: '请输入单位!' },],
614 demandUnit: [{ required: true, message: '请输入需求单位!' },], 709 demandUnit: [{ required: true, message: '请输入需求单位!' },],
@@ -631,6 +726,9 @@ @@ -631,6 +726,9 @@
631 importExcelUrl: function(){ 726 importExcelUrl: function(){
632 return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; 727 return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
633 }, 728 },
  729 + importExcelUrlBoh: function(){
  730 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlBoh}`;
  731 + },
634 }, 732 },
635 methods: { 733 methods: {
636 reSeach() { 734 reSeach() {
@@ -647,7 +745,7 @@ @@ -647,7 +745,7 @@
647 searchHth(){ 745 searchHth(){
648 getAction(this.url.searchHth,{ 746 getAction(this.url.searchHth,{
649 hth: this.model.hth, 747 hth: this.model.hth,
650 - wlbm: this.model.meterialCode 748 + wlbm: this.model.materialCode
651 }).then(res=>{ 749 }).then(res=>{
652 if (res.success){ 750 if (res.success){
653 if (res.result.sl == null || res.result.supplier == null || res.result.wldh == null){ 751 if (res.result.sl == null || res.result.supplier == null || res.result.wldh == null){
@@ -672,15 +770,22 @@ @@ -672,15 +770,22 @@
672 handleInventoryDefective(){ 770 handleInventoryDefective(){
673 this.visibleDefective = true; 771 this.visibleDefective = true;
674 }, 772 },
  773 + updateInventoryBoh(recode){
  774 + console.log("..............",recode)
  775 + this.model2= {}
  776 + this.model2 = recode;
  777 + this.model2.materialDescription = recode.materialReview;
  778 + this.visibleBoh = true;
  779 + },
675 handleInventoryInfo(recode){ 780 handleInventoryInfo(recode){
676 - this.meterialCode = recode.meterialCode; 781 + this.materialCode = recode.materialCode;
677 this.visibleInfo = true; 782 this.visibleInfo = true;
678 }, 783 },
679 handleInventoryInfoIn(recode){ 784 handleInventoryInfoIn(recode){
680 this.model = {} 785 this.model = {}
681 console.log(recode) 786 console.log(recode)
682 - this.model.meterialCode = recode.meterialCode;  
683 - this.model.meterialReview = recode.meterialReview; 787 + this.model.materialCode = recode.materialCode;
  788 + this.model.materialReview = recode.materialReview;
684 this.model.unit = recode.unit; 789 this.model.unit = recode.unit;
685 this.model.brand = recode.brand; 790 this.model.brand = recode.brand;
686 this.visibleInfoIn = true; 791 this.visibleInfoIn = true;
@@ -688,8 +793,8 @@ @@ -688,8 +793,8 @@
688 handleInventoryInfoOut(recode){ 793 handleInventoryInfoOut(recode){
689 this.model2= {} 794 this.model2= {}
690 console.log("..............",recode) 795 console.log("..............",recode)
691 - this.model2.meterialCode = recode.meterialCode;  
692 - this.model2.meterialReview = recode.meterialReview; 796 + this.model2.materialCode = recode.materialCode;
  797 + this.model2.materialReview = recode.materialReview;
693 this.model2.unit = recode.unit; 798 this.model2.unit = recode.unit;
694 this.model2.brand = recode.brand; 799 this.model2.brand = recode.brand;
695 this.visibleInfoOut = true; 800 this.visibleInfoOut = true;
@@ -709,8 +814,8 @@ @@ -709,8 +814,8 @@
709 }, 814 },
710 // 出库页面确认 815 // 出库页面确认
711 handleOkInfoOut(){ 816 handleOkInfoOut(){
712 - this.model2.materialCode = this.model2.meterialCode  
713 - this.model2.materialDescription = this.model2.meterialReview 817 + this.model2.materialCode = this.model2.materialCode
  818 + this.model2.materialDescription = this.model2.materialReview
714 this.model2.measurementUnit = this.model2.unit 819 this.model2.measurementUnit = this.model2.unit
715 postAction(this.url.out,this.model2).then(res=>{ 820 postAction(this.url.out,this.model2).then(res=>{
716 this.reSeach(); 821 this.reSeach();
@@ -726,16 +831,33 @@ @@ -726,16 +831,33 @@
726 handleCancelInfoOut(){ 831 handleCancelInfoOut(){
727 this.reSeach(); 832 this.reSeach();
728 this.visibleInfoOut = false 833 this.visibleInfoOut = false
729 - }  
730 -  
731 -  
732 - , 834 + },
  835 + handleOkBohInfo(){
  836 + this.$refs.form.validate((valid) => {
  837 + if (valid){
  838 + postAction(this.url.updateBoh,this.model2).then(res=>{
  839 + this.reSeach();
  840 + if (res.success){
  841 + this.$message.success("更新成功")
  842 + }else {
  843 + this.$message.error(res.message)
  844 + }
  845 + })
  846 + console.log("提交表单内容")
  847 + this.visibleBoh = false
  848 + }
  849 + })
  850 + },
  851 + handleCancelBoh(){
  852 + this.visibleBoh = false;
  853 + this.model2 = {}
  854 + },
733 handleOkInfoIn(){ 855 handleOkInfoIn(){
734 this.$refs.form.validate((valid) => { 856 this.$refs.form.validate((valid) => {
735 if (valid){ 857 if (valid){
736 postAction(this.url.store,{ 858 postAction(this.url.store,{
737 - materialCode: this.model.meterialCode, //物料编码  
738 - materialDescription: this.model.meterialReview, //长描述 859 + materialCode: this.model.materialCode, //物料编码
  860 + materialDescription: this.model.materialReview, //长描述
739 measurementUnit: this.model.unit, //单位 861 measurementUnit: this.model.unit, //单位
740 brand: this.model.brand,//品牌 862 brand: this.model.brand,//品牌
741 hth: this.model.hth, //合同号 863 hth: this.model.hth, //合同号
@@ -783,8 +905,8 @@ @@ -783,8 +905,8 @@
783 }, 905 },
784 getSuperFieldList(){ 906 getSuperFieldList(){
785 let fieldList=[]; 907 let fieldList=[];
786 - fieldList.push({type:'string',value:'meterialCode',text:'物料编码',dictCode:''})  
787 - fieldList.push({type:'string',value:'meterialReview',text:'物料长描述',dictCode:''}) 908 + fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''})
  909 + fieldList.push({type:'string',value:'materialReview',text:'物料长描述',dictCode:''})
788 fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''}) 910 fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''})
789 fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''}) 911 fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''})
790 fieldList.push({type:'int',value:'actualInventory',text:'实际库存量',dictCode:''}) 912 fieldList.push({type:'int',value:'actualInventory',text:'实际库存量',dictCode:''})
@@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
6 <a-row :gutter="24"> 6 <a-row :gutter="24">
7 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
8 <a-form-item label="物料编码"> 8 <a-form-item label="物料编码">
9 - <a-input placeholder="请输入物料编码" v-model="queryParam.meterialCode"></a-input> 9 + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
10 </a-form-item> 10 </a-form-item>
11 </a-col> 11 </a-col>
12 12
13 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 13 <a-col :xl="6" :lg="7" :md="8" :sm="24">
14 <a-form-item label="物料长描述"> 14 <a-form-item label="物料长描述">
15 - <a-input placeholder="请输入物料长描述" v-model="queryParam.meterialReview"></a-input> 15 + <a-input placeholder="请输入物料长描述" v-model="queryParam.materialReview"></a-input>
16 </a-form-item> 16 </a-form-item>
17 </a-col> 17 </a-col>
18 18
@@ -35,7 +35,16 @@ @@ -35,7 +35,16 @@
35 <!-- 操作按钮区域 --> 35 <!-- 操作按钮区域 -->
36 <div class="table-operator"> 36 <div class="table-operator">
37 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> 37 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
38 - 38 + <a-upload
  39 + name="file"
  40 + :showUploadList="false"
  41 + :multiple="false"
  42 + :headers="tokenHeader"
  43 + :action="importExcelUrl"
  44 + @change="handleImportExcel"
  45 + >
  46 + <a-button type="primary" icon="import">导入</a-button>
  47 + </a-upload>
39 </div> 48 </div>
40 49
41 <!-- table区域-begin --> 50 <!-- table区域-begin -->
@@ -134,12 +143,12 @@ @@ -134,12 +143,12 @@
134 { 143 {
135 title:'物料编码', 144 title:'物料编码',
136 align:"center", 145 align:"center",
137 - dataIndex: 'meterialCode' 146 + dataIndex: 'materialCode'
138 }, 147 },
139 { 148 {
140 title:'物料长描述', 149 title:'物料长描述',
141 align:"center", 150 align:"center",
142 - dataIndex: 'meterialReview' 151 + dataIndex: 'materialReview'
143 }, 152 },
144 { 153 {
145 title:'单位', 154 title:'单位',
@@ -277,8 +286,8 @@ @@ -277,8 +286,8 @@
277 }, 286 },
278 getSuperFieldList(){ 287 getSuperFieldList(){
279 let fieldList=[]; 288 let fieldList=[];
280 - fieldList.push({type:'string',value:'meterialCode',text:'物料编码',dictCode:''})  
281 - fieldList.push({type:'string',value:'meterialReview',text:'物料长描述',dictCode:''}) 289 + fieldList.push({type:'string',value:'materialCode',text:'物料编码',dictCode:''})
  290 + fieldList.push({type:'string',value:'materialReview',text:'物料长描述',dictCode:''})
282 fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''}) 291 fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''})
283 fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''}) 292 fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''})
284 fieldList.push({type:'string',value:'modelChange',text:'型号变更说明',dictCode:''}) 293 fieldList.push({type:'string',value:'modelChange',text:'型号变更说明',dictCode:''})
@@ -148,10 +148,10 @@ @@ -148,10 +148,10 @@
148 methods: { 148 methods: {
149 searchMaterialCode(){ 149 searchMaterialCode(){
150 getAction(this.url.queryByMaterialCode,{ 150 getAction(this.url.queryByMaterialCode,{
151 - meterialCode: this.model.materialCode 151 + materialCode: this.model.materialCode
152 }).then((res)=>{ 152 }).then((res)=>{
153 if(res.success){ 153 if(res.success){
154 - this.$set(this.model, "materialDescription", res.result.meterialReview); 154 + this.$set(this.model, "materialDescription", res.result.materialReview);
155 this.$set(this.model, "measurementUnit", res.result.unit); 155 this.$set(this.model, "measurementUnit", res.result.unit);
156 this.$set(this.model, "brand", res.result.brand); 156 this.$set(this.model, "brand", res.result.brand);
157 }else{ 157 }else{
@@ -4,13 +4,13 @@ @@ -4,13 +4,13 @@
4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> 4 <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
5 <a-row> 5 <a-row>
6 <a-col :span="12"> 6 <a-col :span="12">
7 - <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialCode">  
8 - <a-input v-model="model.meterialCode" placeholder="请输入物料编码" ></a-input> 7 + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  8 + <a-input v-model="model.materialCode" placeholder="请输入物料编码" ></a-input>
9 </a-form-model-item> 9 </a-form-model-item>
10 </a-col> 10 </a-col>
11 <a-col :span="12"> 11 <a-col :span="12">
12 - <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="meterialReview">  
13 - <a-input v-model="model.meterialReview" placeholder="请输入物料长描述" ></a-input> 12 + <a-form-model-item label="物料长描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialReview">
  13 + <a-input v-model="model.materialReview" placeholder="请输入物料长描述" ></a-input>
14 </a-form-model-item> 14 </a-form-model-item>
15 </a-col> 15 </a-col>
16 <a-col :span="12"> 16 <a-col :span="12">
@@ -18,6 +18,11 @@ @@ -18,6 +18,11 @@
18 <a-input v-model="model.unit" placeholder="请输入单位" ></a-input> 18 <a-input v-model="model.unit" placeholder="请输入单位" ></a-input>
19 </a-form-model-item> 19 </a-form-model-item>
20 </a-col> 20 </a-col>
  21 + <!-- <a-col :span="12">
  22 + <a-form-model-item label="BOH" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryBoh">
  23 + <a-input-number v-model="model.inventoryBoh" placeholder="请输入BOH" ></a-input-number>
  24 + </a-form-model-item>
  25 + </a-col> -->
21 <a-col :span="12"> 26 <a-col :span="12">
22 <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand"> 27 <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brand">
23 <a-input v-model="model.brand" placeholder="请输入品牌" ></a-input> 28 <a-input v-model="model.brand" placeholder="请输入品牌" ></a-input>
@@ -90,13 +95,13 @@ @@ -90,13 +95,13 @@
90 }, 95 },
91 confirmLoading: false, 96 confirmLoading: false,
92 validatorRules: { 97 validatorRules: {
93 - // meterialCode: [ 98 + // materialCode: [
94 // { required: false}, 99 // { required: false},
95 // { validator: (rule, value, callback) => validateDuplicateValue('tbl_trade_meterial', 'meterial_code', value, this.model.id, callback)}, 100 // { validator: (rule, value, callback) => validateDuplicateValue('tbl_trade_meterial', 'meterial_code', value, this.model.id, callback)},
96 // ], 101 // ],
97 102
98 - meterialCode: [{ required: true, message: '请输入物料编码!' }],  
99 - meterialReview: [{ required: true, message: '请输入物料长描述!' }], 103 + materialCode: [{ required: true, message: '请输入物料编码!' }],
  104 + materialReview: [{ required: true, message: '请输入物料长描述!' }],
100 unit: [{ required: true, message: '请输入单位!' }], 105 unit: [{ required: true, message: '请输入单位!' }],
101 brand: [{ required: true, message: '请输入品牌!' }], 106 brand: [{ required: true, message: '请输入品牌!' }],
102 // modelChange: [{ required: true, message: '请输入型号变更说明!' }], 107 // modelChange: [{ required: true, message: '请输入型号变更说明!' }],