From 6bbceeae0a692ef60f429dbca889752fcb09ec9a Mon Sep 17 00:00:00 2001
From: houshuai <17802598606@163.com>
Date: 星期四, 03 七月 2025 19:42:01 +0800
Subject: [PATCH] 线边库和订单 基本页面搭建
---
src/views/lsw/modules/LswMaterialInventoryForm.vue | 2
src/views/lsw/LswMaterialOutboundList.vue | 38
src/views/pms/modules/PmsProcessBillMaterialsForm.vue | 144 ++++
src/views/base/FactoryManager.vue | 6
src/views/lsw/modules/LswMaterialForm.vue | 77 +
src/views/pms/modules/PmsProcessBillMaterialsModal.vue | 60 +
src/views/pms/modules/PmsMaterialProcessForm.vue | 172 +++++
src/views/pms/modules/PmsProcessBillMaterialsDetailForm.vue | 141 ++++
src/views/pms/modules/PmsProcessBillMaterialsDetailModal.vue | 60 +
src/views/pms/PmsProcessBillMaterialsList.vue | 241 +++++++
src/views/lsw/modules/LswMaterialOutboundForm.vue | 71 +
src/views/pms/PmsProcessBillMaterialsDetailList.vue | 207 ++++++
src/views/lsw/LswMaterialInboundList.vue | 58 +
src/views/lsw/modules/LswMaterialInboundForm.vue | 237 ++++---
src/views/pms/PmsMaterialProcessList.vue | 213 ++++++
src/views/pms/modules/PmsMaterialProcessModal.vue | 60 +
src/views/lsw/LswMateriaView.vue | 43 +
17 files changed, 1,661 insertions(+), 169 deletions(-)
diff --git a/src/views/base/FactoryManager.vue b/src/views/base/FactoryManager.vue
index 8d11dc0..93ea983 100644
--- a/src/views/base/FactoryManager.vue
+++ b/src/views/base/FactoryManager.vue
@@ -119,11 +119,11 @@
</a-row>
</template>
<script>
- import UserFactory from './modules/factoryManager/UserFactory'
+ import UserFactory from './modules/FactoryManager/UserFactory'
import { queryFactoryTreeList, searchByKeywords, deleteByFactory } from '@/api/api'
import { httpAction, deleteAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import FactoryModal from './modules/factoryManager/FactoryModal'
+ import FactoryModal from './modules/FactoryManager/FactoryModal'
export default {
name: 'FactoryManager',
@@ -220,7 +220,7 @@
this.iExpandedKeys = expandedKeys
this.autoExpandParent = false
},
-
+
batchDel: function() {
this.isIncludesNotLeaf = false
this.includesNotLeaf(this.factoryTree)
diff --git a/src/views/lsw/LswMateriaView.vue b/src/views/lsw/LswMateriaView.vue
index 0b726ef..9dee24c 100644
--- a/src/views/lsw/LswMateriaView.vue
+++ b/src/views/lsw/LswMateriaView.vue
@@ -3,7 +3,39 @@
:bordered="false"
title="绾胯竟搴撶墿鏂欎俊鎭�"
>
- <a-button @click="handleAdd" type="primary" icon="plus">鏂板鐗╂枡淇℃伅-娴嬭瘯</a-button>
+ <div class="table-page-search-wrapper">
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
+ <a-row :gutter="24">
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡缂栫爜">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍚嶇О">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍨嬪彿">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏瀷鍙�" v-model="queryParam.materialModel"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡绫诲瀷">
+ <j-dict-select-tag placeholder="璇疯緭鍏ョ墿鏂欑被鍨�" dictCode="material_category" v-model="queryParam.materialCategory"></j-dict-select-tag>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </span>
+ </a-col>
+ </a-row>
+ </a-form>
+ </div>
+<!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板鐗╂枡淇℃伅-娴嬭瘯</a-button>-->
<a-spin :spinning="confirmLoading">
<div>
<!-- 涓昏〃鍗曞尯鍩� -->
@@ -154,8 +186,8 @@
defaultValue: ''
},
{
- title: '搴撳瓨鍦癐D',
- key: 'warehouseId',
+ title: '搴撳瓨鍦�',
+ key: 'warehouseName',
type: JVXETypes.input,
width: '200px',
placeholder: '璇疯緭鍏�${title}',
@@ -172,6 +204,7 @@
]
},
url: {
+ //searchlikeQuery
list: '/lswmaterial/lswMaterial/list',
queryById: '/lswmaterial/lswMaterial/queryById',
lswMaterialInventory: {
@@ -212,15 +245,17 @@
console.log('test---->', this.selectedRowKeys[0])
},
async onSelectChange(selectedRowKeys) {
+ this.lswMaterialInventoryTable.loading = true
// 鍗曢�夋ā寮忎笅锛宻electedRowKeys 鏄暟缁勶紝浣嗛暱搴︽渶澶氫负1
console.log('鐐瑰嚮浜�---->')
this.selectedRowKeys = selectedRowKeys
-
+ this.lswMaterialInventoryTable.dataSource=[]
// 鑾峰彇閫変腑琛岀殑瀹屾暣鏁版嵁
if (selectedRowKeys.length > 0) {
const selectedId = selectedRowKeys[0] // 閫変腑琛岀殑id
const lswMaterialInventoryResult = await getAction(this.url.lswMaterialInventory.list, { 'id': selectedId })
this.lswMaterialInventoryTable.dataSource = lswMaterialInventoryResult.result
+ this.lswMaterialInventoryTable.loading = false
}
}
diff --git a/src/views/lsw/LswMaterialInboundList.vue b/src/views/lsw/LswMaterialInboundList.vue
index 97c81f4..a0e75c8 100644
--- a/src/views/lsw/LswMaterialInboundList.vue
+++ b/src/views/lsw/LswMaterialInboundList.vue
@@ -4,6 +4,27 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡缂栫爜">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍚嶇О">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鎵规鍙�">
+ <j-input placeholder="璇疯緭鍏ユ壒娆″彿" v-model="queryParam.batchNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </span>
+ </a-col>
</a-row>
</a-form>
</div>
@@ -12,12 +33,6 @@
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
- <a-button type="primary" icon="download" @click="handleExportXls('鐗╂枡鍏ュ簱鍗�')">瀵煎嚭</a-button>
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
- <a-button type="primary" icon="import">瀵煎叆</a-button>
- </a-upload>
- <!-- 楂樼骇鏌ヨ鍖哄煙 -->
- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
@@ -122,19 +137,14 @@
}
},
{
- title:'鍒犻櫎鏍囪',
+ title:'浜х嚎',
align:"center",
- dataIndex: 'delFlag'
+ dataIndex: 'factoryId_dictText'
},
{
- title:'浜х嚎ID',
+ title:'搴撳瓨鍦�',
align:"center",
- dataIndex: 'factoryId'
- },
- {
- title:'搴撳瓨鍦癐D',
- align:"center",
- dataIndex: 'warehouseId'
+ dataIndex: 'warehouseId_dictText'
},
{
title:'鐗╂枡缂栫爜',
@@ -166,14 +176,14 @@
align:"center",
dataIndex: 'receiveTime'
},
- {
- title: '鎿嶄綔',
- dataIndex: 'action',
- align:"center",
- fixed:"right",
- width:147,
- scopedSlots: { customRender: 'action' }
- }
+ // {
+ // title: '鎿嶄綔',
+ // dataIndex: 'action',
+ // align:"center",
+ // fixed:"right",
+ // width:147,
+ // scopedSlots: { customRender: 'action' }
+ // }
],
url: {
list: "/lswmaterialinbound/lswMaterialInbound/list",
@@ -181,7 +191,6 @@
deleteBatch: "/lswmaterialinbound/lswMaterialInbound/deleteBatch",
exportXlsUrl: "/lswmaterialinbound/lswMaterialInbound/exportXls",
importExcelUrl: "lswmaterialinbound/lswMaterialInbound/importExcel",
-
},
dictOptions:{},
superFieldList:[],
@@ -197,6 +206,7 @@
},
methods: {
initDictConfig(){
+
},
getSuperFieldList(){
let fieldList=[];
diff --git a/src/views/lsw/LswMaterialOutboundList.vue b/src/views/lsw/LswMaterialOutboundList.vue
index 7045f44..b38cd0d 100644
--- a/src/views/lsw/LswMaterialOutboundList.vue
+++ b/src/views/lsw/LswMaterialOutboundList.vue
@@ -4,6 +4,27 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡缂栫爜">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍚嶇О">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鎵规鍙�">
+ <j-input placeholder="璇疯緭鍏ユ壒娆″彿" v-model="queryParam.batchNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </span>
+ </a-col>
</a-row>
</a-form>
</div>
@@ -12,12 +33,6 @@
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
- <a-button type="primary" icon="download" @click="handleExportXls('鐗╂枡鍑哄簱鍗�')">瀵煎嚭</a-button>
- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
- <a-button type="primary" icon="import">瀵煎叆</a-button>
- </a-upload>
- <!-- 楂樼骇鏌ヨ鍖哄煙 -->
- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
@@ -122,11 +137,6 @@
}
},
{
- title:'鍒犻櫎鏍囪',
- align:"center",
- dataIndex: 'delFlag'
- },
- {
title:'鐗╂枡缂栫爜',
align:"center",
dataIndex: 'materialNumber'
@@ -137,9 +147,9 @@
dataIndex: 'materialName'
},
{
- title:'浜х嚎ID',
+ title:'浜х嚎',
align:"center",
- dataIndex: 'factoryId'
+ dataIndex: 'factoryId_dictText'
},
{
title:'鎵规鍙�',
@@ -162,7 +172,7 @@
dataIndex: 'quantity'
},
{
- title:'宸ュ崟ID',
+ title:'宸ュ崟',
align:"center",
dataIndex: 'workOrderId'
},
diff --git a/src/views/lsw/modules/LswMaterialForm.vue b/src/views/lsw/modules/LswMaterialForm.vue
index 8c4958e..98276bb 100644
--- a/src/views/lsw/modules/LswMaterialForm.vue
+++ b/src/views/lsw/modules/LswMaterialForm.vue
@@ -69,6 +69,7 @@
},
data() {
return {
+ warehouseColOptions: [],
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@@ -81,8 +82,6 @@
},
// 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
addDefaultRowNum: 1,
- validatorRules: {
- },
refKeys: ['lswMaterialInventory', ],
tableKeys:['lswMaterialInventory', ],
activeKey: 'lswMaterialInventory',
@@ -91,14 +90,6 @@
loading: false,
dataSource: [],
columns: [
- {
- title: '鐗╂枡ID',
- key: 'materialId',
- type: JVXETypes.input,
- width:"200px",
- placeholder: '璇疯緭鍏�${title}',
- defaultValue:'',
- },
{
title: '鎵规鍙�',
key: 'batchNumber',
@@ -110,10 +101,12 @@
{
title: '搴撳瓨绫诲瀷',
key: 'inventoryCategory',
- type: JVXETypes.input,
+ type: JVXETypes.select,
width:"200px",
- placeholder: '璇疯緭鍏�${title}',
+ placeholder: '璇烽�夋嫨${title}',
defaultValue:'',
+ options:[],
+ dictCode: 'inventoryCategory'
},
{
title: '鏁伴噺',
@@ -124,27 +117,46 @@
defaultValue:'',
},
{
- title: '搴撳瓨鍦癐D',
+ title: '搴撳瓨鍦�',
key: 'warehouseId',
- type: JVXETypes.input,
- width:"200px",
- placeholder: '璇疯緭鍏�${title}',
- defaultValue:'',
+ type: JVXETypes.select,
+ width: "200px",
+ options: this.warehouseColOptions,
},
{
title: '搴撳瓨鐘舵��',
key: 'inventoryStatus',
- type: JVXETypes.input,
+ type: JVXETypes.select,
width:"200px",
placeholder: '璇疯緭鍏�${title}',
defaultValue:'',
+ options:[],
+ dictCode: 'inventory_status'
},
]
+ },
+ validatorRules: {
+ materialNumber: [
+ { required: true, message: '鐗╂枡缂栫爜鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialName: [
+ { required: true, message: '鐗╂枡鍚嶇О鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialModel: [
+ { required: true, message: '鐗╂枡鍨嬪彿鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialCategory: [
+ { required: true, message: '鐗╂枡绫诲瀷鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialUnit: [
+ { required: true, message: '鍗曚綅鏄繀閫夐」', trigger: 'change' }
+ ],
},
url: {
add: "/lswmaterial/lswMaterial/add",
edit: "/lswmaterial/lswMaterial/edit",
queryById: "/lswmaterial/lswMaterial/queryById",
+ warehouseList:"/base/lineSideWarehouse/list",
lswMaterialInventory: {
list: '/lswmaterial/lswMaterial/queryLswMaterialInventoryByMainId'
},
@@ -165,8 +177,37 @@
},
},
created () {
+ this.loadWarehouseOptions();
},
methods: {
+ async loadWarehouseOptions() {
+ try {
+ const res = await getAction(this.url.warehouseList);
+ console.log("浠撳簱API鍝嶅簲:", res);
+ let data = [];
+ data = res.result.records;
+ console.log("澶勭悊鍚庣殑浠撳簱鏁版嵁:", data);
+ const options = data.map(item => ({
+ text: item.warehouseName || `浠撳簱(${item.id})`, // 鏄剧ず鏂囨湰
+ value: item.id // 瀹為檯鍊�
+ }));
+ console.log("鏍煎紡鍖栧悗鐨勯�夐」:", options);
+ const warehouseCol = this.lswMaterialInventoryTable.columns.find(
+ col => col.key === 'warehouseId'
+ );
+ if (warehouseCol) {
+ this.$set(warehouseCol, 'options', options);
+ this.warehouseColOptions = warehouseCol.options
+ console.log("鏇存柊鍚庣殑鍒楅�夐」:", warehouseCol.options);
+ }
+ this.$nextTick(() => {
+ this.$forceUpdate();
+ console.log("宸插己鍒舵洿鏂拌鍥�");
+ });
+ } catch (error) {
+ console.error('鍔犺浇浠撳簱鍒楄〃澶辫触:', error);
+ }
+ },
addBefore(){
this.lswMaterialInventoryTable.dataSource=[]
},
diff --git a/src/views/lsw/modules/LswMaterialInboundForm.vue b/src/views/lsw/modules/LswMaterialInboundForm.vue
index 80c577d..eb3dc18 100644
--- a/src/views/lsw/modules/LswMaterialInboundForm.vue
+++ b/src/views/lsw/modules/LswMaterialInboundForm.vue
@@ -3,34 +3,45 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
+ <a-form-model-item label="浜х嚎" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId">
+ <a-row :gutter="24">
+ <a-col :span="24">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label=""
+ >
+ <j-select-factory
+ :disabled="disabled"
+ v-model="model.factoryId"
+ :multi="true"
+ @back="backFactoryInfo"
+ :backProduction="true"
+ :treeProductOpera="true"
+ ></j-select-factory>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form-model-item>
<a-col :span="12">
- <a-form-model-item label="鍒犻櫎鏍囪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
- <a-input-number v-model="model.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" style="width: 100%" />
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="浜х嚎ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId">
- <a-input v-model="model.factoryId" placeholder="璇疯緭鍏ヤ骇绾縄D" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
- <a-form-model-item label="搴撳瓨鍦癐D" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouseId">
- <a-input v-model="model.warehouseId" placeholder="璇疯緭鍏ュ簱瀛樺湴ID" ></a-input>
+ <a-form-model-item label="搴撳瓨鍦�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouseId">
+ <j-search-select-tag v-model="model.warehouseId" placeholder="璇烽�夋嫨搴撳瓨鍦�"
+ dict="base_line_side_warehouse,warehouse_name,id"></j-search-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="鐗╂枡缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber">
- <a-input v-model="model.materialNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ></a-input>
+ <a-input v-model="model.materialNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="鐗╂枡鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName">
- <a-input v-model="model.materialName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" ></a-input>
+ <a-input v-model="model.materialName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="鎵规鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchNumber">
- <a-input v-model="model.batchNumber" placeholder="璇疯緭鍏ユ壒娆″彿" ></a-input>
+ <a-input v-model="model.batchNumber" placeholder="璇疯緭鍏ユ壒娆″彿"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
@@ -40,12 +51,13 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="鎺ユ敹浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiver">
- <a-input v-model="model.receiver" placeholder="璇疯緭鍏ユ帴鏀朵汉" ></a-input>
+ <j-select-user-by-dep v-model="model.receiver" placeholder="璇疯緭鍏ユ帴鏀朵汉"></j-select-user-by-dep>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="鎺ユ敹鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiveTime">
- <j-date placeholder="璇烽�夋嫨鎺ユ敹鏃堕棿" v-model="model.receiveTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+ <j-date placeholder="璇烽�夋嫨鎺ユ敹鏃堕棿" v-model="model.receiveTime" :show-time="true"
+ date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
@@ -56,89 +68,128 @@
<script>
- import { httpAction, getAction } from '@/api/manage'
- import { validateDuplicateValue } from '@/utils/util'
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+import JDate from '@/components/jeecg/JDate'
+import pick from 'lodash.pick'
+import moment from 'moment'
+import { duplicateCheck } from '@/api/api'//閲嶅鏍¢獙
+import JTreeDict from '@/components/jeecg/JTreeDict'//鍒嗙被瀛楀吀鏍戝舰涓嬫媺缁勪欢
+import JSelectFactory from '../../../../src/components/jeecgbiz/JSelectFactory.vue'
- export default {
- name: 'LswMaterialInboundForm',
- components: {
- },
- props: {
- //琛ㄥ崟绂佺敤
- disabled: {
- type: Boolean,
- default: false,
- required: false
+export default {
+ name: 'LswMaterialInboundForm',
+ components: {
+ JDate,
+ JTreeDict,
+ JSelectFactory
+ },
+ props: {
+ //琛ㄥ崟绂佺敤
+ disabled: {
+ type: Boolean,
+ default: false,
+ required: false
+ }
+ },
+ data() {
+ return {
+ model: {},
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 5 }
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 }
+ },
+ confirmLoading: false,
+ validatorRules: {
+ factoryId: [
+ { required: true, message: '浜х嚎鏄繀閫夐」', trigger: 'change' }
+ ],
+ warehouseId: [
+ { required: true, message: '搴撳瓨鍦版槸蹇呴�夐」', trigger: 'change' }
+ ],
+ materialNumber: [
+ { required: true, message: '鐗╂枡缂栫爜鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialName: [
+ { required: true, message: '鐗╂枡鍚嶇О鏄繀閫夐」', trigger: 'change' }
+ ],
+ batchNumber: [
+ { required: true, message: '鎵规鍙锋槸蹇呴�夐」', trigger: 'change' }
+ ],
+ quantity: [
+ { required: true, message: '鍏ュ簱鏁伴噺鏄繀閫夐」', trigger: 'change' }
+ ],
+ receiver: [
+ { required: true, message: '鎺ユ敹浜烘槸蹇呴�夐」', trigger: 'change' }
+ ],
+ receiveTime: [
+ { required: true, message: '鎺ユ敹鏃堕棿鏄繀閫夐」', trigger: 'change' }
+ ]
+ },
+ url: {
+ add: '/lswmaterialinbound/lswMaterialInbound/add',
+ edit: '/lswmaterialinbound/lswMaterialInbound/edit',
+ queryById: '/lswmaterialinbound/lswMaterialInbound/queryById'
}
+ }
+ },
+ computed: {
+ formDisabled() {
+ return this.disabled
+ }
+ },
+ created() {
+ //澶囦唤model鍘熷鍊�
+ this.modelDefault = JSON.parse(JSON.stringify(this.model))
+ },
+ methods: {
+ backFactoryInfo(info) {
+ this.model.factoryIds = this.model.factoryId
+ this.nextFactoryOptions = info.map((item, index, arr) => {
+ let c = { label: item.text, value: item.value + '' }
+ return c
+ })
},
- data () {
- return {
- model:{
- },
- labelCol: {
- xs: { span: 24 },
- sm: { span: 5 },
- },
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 16 },
- },
- confirmLoading: false,
- validatorRules: {
- },
- url: {
- add: "/lswmaterialinbound/lswMaterialInbound/add",
- edit: "/lswmaterialinbound/lswMaterialInbound/edit",
- queryById: "/lswmaterialinbound/lswMaterialInbound/queryById"
- }
- }
+ add() {
+ this.edit(this.modelDefault)
},
- computed: {
- formDisabled(){
- return this.disabled
- },
+ edit(record) {
+ this.model = Object.assign({}, record)
+ this.visible = true
},
- created () {
- //澶囦唤model鍘熷鍊�
- this.modelDefault = JSON.parse(JSON.stringify(this.model));
- },
- methods: {
- add () {
- this.edit(this.modelDefault);
- },
- edit (record) {
- this.model = Object.assign({}, record);
- this.visible = true;
- },
- submitForm () {
- const that = this;
- // 瑙﹀彂琛ㄥ崟楠岃瘉
- this.$refs.form.validate(valid => {
- if (valid) {
- that.confirmLoading = true;
- let httpurl = '';
- let method = '';
- if(!this.model.id){
- httpurl+=this.url.add;
- method = 'post';
- }else{
- httpurl+=this.url.edit;
- method = 'put';
- }
- httpAction(httpurl,this.model,method).then((res)=>{
- if(res.success){
- that.$message.success(res.message);
- that.$emit('ok');
- }else{
- that.$message.warning(res.message);
- }
- }).finally(() => {
- that.confirmLoading = false;
- })
+ submitForm() {
+ const that = this
+ // 瑙﹀彂琛ㄥ崟楠岃瘉
+ this.$refs.form.validate(valid => {
+ if (valid) {
+ that.confirmLoading = true
+ let httpurl = ''
+ let method = ''
+ if (!this.model.id) {
+ httpurl += this.url.add
+ method = 'post'
+ } else {
+ httpurl += this.url.edit
+ method = 'put'
}
+ httpAction(httpurl, this.model, method).then((res) => {
+ if (res.success) {
+ that.$message.success(res.message)
+ that.$emit('ok')
+ } else {
+ that.$message.warning(res.message)
+ }
+ }).finally(() => {
+ that.confirmLoading = false
+ })
+ }
- })
- },
+ })
}
}
+}
</script>
\ No newline at end of file
diff --git a/src/views/lsw/modules/LswMaterialInventoryForm.vue b/src/views/lsw/modules/LswMaterialInventoryForm.vue
index 79637ba..ddc905e 100644
--- a/src/views/lsw/modules/LswMaterialInventoryForm.vue
+++ b/src/views/lsw/modules/LswMaterialInventoryForm.vue
@@ -20,7 +20,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
- <a-input v-model="model.quantity" placeholder="璇疯緭鍏ユ暟閲�" ></a-input>
+ <a-input-number v-model="model.quantity" placeholder="璇疯緭鍏ユ暟閲�" ></a-input-number>
</a-form-model-item>
</a-col>
<a-col :span="12">
diff --git a/src/views/lsw/modules/LswMaterialOutboundForm.vue b/src/views/lsw/modules/LswMaterialOutboundForm.vue
index eebe46f..d4f84b3 100644
--- a/src/views/lsw/modules/LswMaterialOutboundForm.vue
+++ b/src/views/lsw/modules/LswMaterialOutboundForm.vue
@@ -3,11 +3,26 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
- <a-col :span="12">
- <a-form-model-item label="鍒犻櫎鏍囪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag">
- <a-input-number v-model="model.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" style="width: 100%" />
- </a-form-model-item>
- </a-col>
+ <a-form-model-item label="浜х嚎" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId">
+ <a-row :gutter="24">
+ <a-col :span="24">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label=""
+ >
+ <j-select-factory
+ :disabled="disabled"
+ v-model="model.factoryId"
+ :multi="true"
+ @back="backFactoryInfo"
+ :backProduction="true"
+ :treeProductOpera="true"
+ ></j-select-factory>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form-model-item>
<a-col :span="12">
<a-form-model-item label="鐗╂枡缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber">
<a-input v-model="model.materialNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ></a-input>
@@ -19,18 +34,13 @@
</a-form-model-item>
</a-col>
<a-col :span="12">
- <a-form-model-item label="浜х嚎ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId">
- <a-input v-model="model.factoryId" placeholder="璇疯緭鍏ヤ骇绾縄D" ></a-input>
- </a-form-model-item>
- </a-col>
- <a-col :span="12">
<a-form-model-item label="鎵规鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="batchNumber">
<a-input v-model="model.batchNumber" placeholder="璇疯緭鍏ユ壒娆″彿" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="鍑哄簱浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundStaff">
- <a-input v-model="model.outboundStaff" placeholder="璇疯緭鍏ュ嚭搴撲汉" ></a-input>
+ <j-select-user-by-dep v-model="model.outboundStaff" placeholder="璇疯緭鍏ュ嚭搴撲汉" ></j-select-user-by-dep>
</a-form-model-item>
</a-col>
<a-col :span="12">
@@ -40,7 +50,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="鍑哄簱鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity">
- <a-input v-model="model.quantity" placeholder="璇疯緭鍏ュ嚭搴撴暟閲�" ></a-input>
+ <a-input-number v-model="model.quantity" placeholder="璇疯緭鍏ュ嚭搴撴暟閲�" ></a-input-number>
</a-form-model-item>
</a-col>
<a-col :span="12">
@@ -58,10 +68,16 @@
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
+ import JTreeDict from '@/components/jeecg/JTreeDict'//鍒嗙被瀛楀吀鏍戝舰涓嬫媺缁勪欢
+ import JSelectFactory from '../../../../src/components/jeecgbiz/JSelectFactory.vue'
+ import JDate from '@/components/jeecg/JDate'
export default {
name: 'LswMaterialOutboundForm',
components: {
+ JDate,
+ JTreeDict,
+ JSelectFactory
},
props: {
//琛ㄥ崟绂佺敤
@@ -85,6 +101,30 @@
},
confirmLoading: false,
validatorRules: {
+ factoryId: [
+ { required: true, message: '浜х嚎鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialNumber: [
+ { required: true, message: '鐗╂枡缂栫爜鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialName: [
+ { required: true, message: '鐗╂枡鍚嶇О鏄繀閫夐」', trigger: 'change' }
+ ],
+ batchNumber: [
+ { required: true, message: '鎵规鍙锋槸蹇呴�夐」', trigger: 'change' }
+ ],
+ quantity: [
+ { required: true, message: '鍑哄簱鏁伴噺鏄繀閫夐」', trigger: 'change' }
+ ],
+ outboundStaff: [
+ { required: true, message: '鍑哄簱浜烘槸蹇呴�夐」', trigger: 'change' }
+ ],
+ outboundTime: [
+ { required: true, message: '鍑哄簱鏃堕棿鏄繀閫夐」', trigger: 'change' }
+ ],
+ workOrderId:[
+ { required: true, message: '宸ュ崟鏄繀閫夐」', trigger: 'change' }
+ ],
},
url: {
add: "/lswmaterialoutbound/lswMaterialOutbound/add",
@@ -103,6 +143,13 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
+ backFactoryInfo(info) {
+ this.model.factoryIds = this.model.factoryId
+ this.nextFactoryOptions = info.map((item, index, arr) => {
+ let c = { label: item.text, value: item.value + '' }
+ return c
+ })
+ },
add () {
this.edit(this.modelDefault);
},
diff --git a/src/views/pms/PmsMaterialProcessList.vue b/src/views/pms/PmsMaterialProcessList.vue
new file mode 100644
index 0000000..68bfa0c
--- /dev/null
+++ b/src/views/pms/PmsMaterialProcessList.vue
@@ -0,0 +1,213 @@
+<template>
+ <a-card :bordered="false">
+ <!-- 鏌ヨ鍖哄煙 -->
+ <div class="table-page-search-wrapper">
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
+ <a-row :gutter="24">
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡缂栫爜">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍚嶇О">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </span>
+ </a-col>
+ </a-row>
+ </a-form>
+ </div>
+ <!-- 鏌ヨ鍖哄煙-END -->
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <div class="table-operator">
+ <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+ <!-- 楂樼骇鏌ヨ鍖哄煙 -->
+ <a-dropdown v-if="selectedRowKeys.length > 0">
+ <a-menu slot="overlay">
+ <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
+ </a-menu>
+ <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
+ </a-dropdown>
+ </div>
+
+ <!-- table鍖哄煙-begin -->
+ <div>
+ <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+ <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+ <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+ </div>
+
+ <a-table
+ ref="table"
+ size="middle"
+ :scroll="{x:true}"
+ bordered
+ rowKey="id"
+ :columns="columns"
+ :dataSource="dataSource"
+ :pagination="ipagination"
+ :loading="loading"
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+ class="j-table-force-nowrap"
+ @change="handleTableChange">
+
+ <template slot="htmlSlot" slot-scope="text">
+ <div v-html="text"></div>
+ </template>
+ <template slot="imgSlot" slot-scope="text,record">
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+ <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+ </template>
+ <template slot="fileSlot" slot-scope="text">
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+ <a-button
+ v-else
+ :ghost="true"
+ type="primary"
+ icon="download"
+ size="small"
+ @click="downloadFile(text)">
+ 涓嬭浇
+ </a-button>
+ </template>
+
+ <span slot="action" slot-scope="text, record">
+ <a @click="handleEdit(record)">缂栬緫</a>
+
+ <a-divider type="vertical" />
+ <a-dropdown>
+ <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+ <a-menu slot="overlay">
+ <a-menu-item>
+ <a @click="handleDetail(record)">璇︽儏</a>
+ </a-menu-item>
+ <a-menu-item>
+ <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+ <a>鍒犻櫎</a>
+ </a-popconfirm>
+ </a-menu-item>
+ </a-menu>
+ </a-dropdown>
+ </span>
+
+ </a-table>
+ </div>
+
+ <pms-material-process-modal ref="modalForm" @ok="modalFormOk"></pms-material-process-modal>
+ </a-card>
+</template>
+
+<script>
+
+ import '@/assets/less/TableExpand.less'
+ import { mixinDevice } from '@/utils/mixin'
+ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+ import PmsMaterialProcessModal from './modules/PmsMaterialProcessModal'
+
+ export default {
+ name: 'PmsMaterialProcessList',
+ mixins:[JeecgListMixin, mixinDevice],
+ components: {
+ PmsMaterialProcessModal
+ },
+ data () {
+ return {
+ description: '鐗╂枡宸ュ簭绠$悊椤甸潰',
+ // 琛ㄥご
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key:'rowIndex',
+ width:60,
+ align:"center",
+ customRender:function (t,r,index) {
+ return parseInt(index)+1;
+ }
+ },
+ {
+ title:'鐗╂枡缂栫爜',
+ align:"center",
+ dataIndex: 'materialNumber'
+ },
+ {
+ title:'鐗╂枡鍚嶇О',
+ align:"center",
+ dataIndex: 'materialName'
+ },
+ {
+ title:'浜х嚎ID(SAP宸ヤ綔涓績)',
+ align:"center",
+ dataIndex: 'factoryId_dictText'
+ },
+ {
+ title:'宸ュ簭鍙�',
+ align:"center",
+ dataIndex: 'processCode'
+ },
+ {
+ title:'宸ュ簭鍚嶇О',
+ align:"center",
+ dataIndex: 'processName'
+ },
+ {
+ title:'鎺у埗鐮�',
+ align:"center",
+ dataIndex: 'controlCode'
+ },
+ {
+ title: '鎿嶄綔',
+ dataIndex: 'action',
+ align:"center",
+ fixed:"right",
+ width:147,
+ scopedSlots: { customRender: 'action' }
+ }
+ ],
+ url: {
+ list: "/pms/pmsMaterialProcess/list",
+ delete: "/pms/pmsMaterialProcess/delete",
+ deleteBatch: "/pms/pmsMaterialProcess/deleteBatch",
+ exportXlsUrl: "/pms/pmsMaterialProcess/exportXls",
+ importExcelUrl: "pms/pmsMaterialProcess/importExcel",
+
+ },
+ dictOptions:{},
+ superFieldList:[],
+ }
+ },
+ created() {
+ this.getSuperFieldList();
+ },
+ computed: {
+ importExcelUrl: function(){
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+ },
+ },
+ methods: {
+ initDictConfig(){
+ },
+ getSuperFieldList(){
+ let fieldList=[];
+ fieldList.push({type:'int',value:'delFlag',text:'鍒犻櫎鏍囪',dictCode:''})
+ fieldList.push({type:'string',value:'materialNumber',text:'鐗╂枡缂栫爜',dictCode:''})
+ fieldList.push({type:'string',value:'materialName',text:'鐗╂枡鍚嶇О',dictCode:''})
+ fieldList.push({type:'string',value:'factoryId',text:'浜х嚎ID(SAP宸ヤ綔涓績)',dictCode:''})
+ fieldList.push({type:'string',value:'processCode',text:'宸ュ簭鍙�',dictCode:''})
+ fieldList.push({type:'string',value:'processName',text:'宸ュ簭鍚嶇О',dictCode:''})
+ fieldList.push({type:'string',value:'controlCode',text:'鎺у埗鐮�',dictCode:''})
+ this.superFieldList = fieldList
+ }
+ }
+ }
+</script>
+<style scoped>
+ @import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/pms/PmsProcessBillMaterialsDetailList.vue b/src/views/pms/PmsProcessBillMaterialsDetailList.vue
new file mode 100644
index 0000000..e2ed69c
--- /dev/null
+++ b/src/views/pms/PmsProcessBillMaterialsDetailList.vue
@@ -0,0 +1,207 @@
+<template>
+ <a-card :bordered="false">
+ <!-- 鏌ヨ鍖哄煙 -->
+ <div class="table-page-search-wrapper">
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
+ <a-row :gutter="24">
+ <a-row :gutter="24">
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡缂栫爜">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍚嶇О">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </span>
+ </a-col>
+ </a-row>
+ </a-row>
+ </a-form>
+ </div>
+ <!-- 鏌ヨ鍖哄煙-END -->
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <div class="table-operator">
+ <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+ <a-button type="primary" icon="download" @click="handleExportXls('鐗╂枡娓呭崟')">瀵煎嚭</a-button>
+ <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+ <a-button type="primary" icon="import">瀵煎叆</a-button>
+ </a-upload>
+ <!-- 楂樼骇鏌ヨ鍖哄煙 -->
+ <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+ <a-dropdown v-if="selectedRowKeys.length > 0">
+ <a-menu slot="overlay">
+ <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
+ </a-menu>
+ <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
+ </a-dropdown>
+ </div>
+
+ <!-- table鍖哄煙-begin -->
+ <div>
+ <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+ <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+ <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+ </div>
+
+ <a-table
+ ref="table"
+ size="middle"
+ :scroll="{x:true}"
+ bordered
+ rowKey="id"
+ :columns="columns"
+ :dataSource="dataSource"
+ :pagination="ipagination"
+ :loading="loading"
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+ class="j-table-force-nowrap"
+ @change="handleTableChange">
+
+ <template slot="htmlSlot" slot-scope="text">
+ <div v-html="text"></div>
+ </template>
+ <template slot="imgSlot" slot-scope="text,record">
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+ <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+ </template>
+ <template slot="fileSlot" slot-scope="text">
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+ <a-button
+ v-else
+ :ghost="true"
+ type="primary"
+ icon="download"
+ size="small"
+ @click="downloadFile(text)">
+ 涓嬭浇
+ </a-button>
+ </template>
+
+ <span slot="action" slot-scope="text, record">
+ <a @click="handleEdit(record)">缂栬緫</a>
+
+ <a-divider type="vertical" />
+ <a-dropdown>
+ <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+ <a-menu slot="overlay">
+ <a-menu-item>
+ <a @click="handleDetail(record)">璇︽儏</a>
+ </a-menu-item>
+ <a-menu-item>
+ <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+ <a>鍒犻櫎</a>
+ </a-popconfirm>
+ </a-menu-item>
+ </a-menu>
+ </a-dropdown>
+ </span>
+
+ </a-table>
+ </div>
+
+ <pms-process-bill-materials-detail-modal ref="modalForm" @ok="modalFormOk"></pms-process-bill-materials-detail-modal>
+ </a-card>
+</template>
+
+<script>
+
+ import '@/assets/less/TableExpand.less'
+ import { mixinDevice } from '@/utils/mixin'
+ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+ import PmsProcessBillMaterialsDetailModal from './modules/PmsProcessBillMaterialsDetailModal'
+
+ export default {
+ name: 'PmsProcessBillMaterialsDetailList',
+ mixins:[JeecgListMixin, mixinDevice],
+ components: {
+ PmsProcessBillMaterialsDetailModal
+ },
+ data () {
+ return {
+ description: '鐗╂枡娓呭崟绠$悊椤甸潰',
+ // 琛ㄥご
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key:'rowIndex',
+ width:60,
+ align:"center",
+ customRender:function (t,r,index) {
+ return parseInt(index)+1;
+ }
+ },
+ {
+ title:'鐢熶骇鐗╂枡ID',
+ align:"center",
+ dataIndex: 'materialId_dictText'
+ },
+ {
+ title:'鐗╂枡缂栫爜',
+ align:"center",
+ dataIndex: 'materialNumber'
+ },
+ {
+ title:'鐗╂枡鍚嶇О',
+ align:"center",
+ dataIndex: 'materialName'
+ },
+ {
+ title:'闇�姹傜敤閲�',
+ align:"center",
+ dataIndex: 'usageUnit'
+ },
+ {
+ title: '鎿嶄綔',
+ dataIndex: 'action',
+ align:"center",
+ fixed:"right",
+ width:147,
+ scopedSlots: { customRender: 'action' }
+ }
+ ],
+ url: {
+ list: "/pms/pmsProcessBillMaterialsDetail/list",
+ delete: "/pms/pmsProcessBillMaterialsDetail/delete",
+ deleteBatch: "/pms/pmsProcessBillMaterialsDetail/deleteBatch",
+ exportXlsUrl: "/pms/pmsProcessBillMaterialsDetail/exportXls",
+ importExcelUrl: "pms/pmsProcessBillMaterialsDetail/importExcel",
+
+ },
+ dictOptions:{},
+ superFieldList:[],
+ }
+ },
+ created() {
+ this.getSuperFieldList();
+ },
+ computed: {
+ importExcelUrl: function(){
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+ },
+ },
+ methods: {
+ initDictConfig(){
+ },
+ getSuperFieldList(){
+ let fieldList=[];
+ fieldList.push({type:'string',value:'materialId',text:'鐢熶骇鐗╂枡ID',dictCode:''})
+ fieldList.push({type:'string',value:'materialNumber',text:'鐗╂枡缂栫爜',dictCode:''})
+ fieldList.push({type:'string',value:'materialName',text:'鐗╂枡鍚嶇О',dictCode:''})
+ fieldList.push({type:'double',value:'usageUnit',text:'闇�姹傜敤閲�',dictCode:''})
+ this.superFieldList = fieldList
+ }
+ }
+ }
+</script>
+<style scoped>
+ @import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/pms/PmsProcessBillMaterialsList.vue b/src/views/pms/PmsProcessBillMaterialsList.vue
new file mode 100644
index 0000000..8e8f6bd
--- /dev/null
+++ b/src/views/pms/PmsProcessBillMaterialsList.vue
@@ -0,0 +1,241 @@
+<template>
+ <a-card :bordered="false">
+ <!-- 鏌ヨ鍖哄煙 -->
+ <div class="table-page-search-wrapper">
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
+ <a-row :gutter="24">
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡缂栫爜">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" v-model="queryParam.materialNumber"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <a-form-item label="鐗╂枡鍚嶇О">
+ <j-input placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" v-model="queryParam.materialName"></j-input>
+ </a-form-item>
+ </a-col>
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+ <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
+ </span>
+ </a-col>
+ </a-row>
+ </a-form>
+ </div>
+ <!-- 鏌ヨ鍖哄煙-END -->
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <div class="table-operator">
+ <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+ <!-- 楂樼骇鏌ヨ鍖哄煙 -->
+ <a-dropdown v-if="selectedRowKeys.length > 0">
+ <a-menu slot="overlay">
+ <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
+ </a-menu>
+ <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
+ </a-dropdown>
+ </div>
+ <!-- table鍖哄煙-begin -->
+ <div>
+ <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+ <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+ <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+ </div>
+
+ <a-table
+ ref="table"
+ size="middle"
+ :scroll="{x:true}"
+ bordered
+ rowKey="id"
+ :columns="columns"
+ :dataSource="dataSource"
+ :pagination="ipagination"
+ :loading="loading"
+ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+ class="j-table-force-nowrap"
+ @change="handleTableChange">
+
+ <template slot="htmlSlot" slot-scope="text">
+ <div v-html="text"></div>
+ </template>
+ <template slot="imgSlot" slot-scope="text,record">
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>
+ <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+ </template>
+ <template slot="fileSlot" slot-scope="text">
+ <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>
+ <a-button
+ v-else
+ :ghost="true"
+ type="primary"
+ icon="download"
+ size="small"
+ @click="downloadFile(text)">
+ 涓嬭浇
+ </a-button>
+ </template>
+
+ <span slot="action" slot-scope="text, record">
+ <a @click="handleEdit(record)">缂栬緫</a>
+
+ <a-divider type="vertical" />
+ <a-dropdown>
+ <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+ <a-menu slot="overlay">
+ <a-menu-item>
+ <a @click="handleDetail(record)">璇︽儏</a>
+ </a-menu-item>
+ <a-menu-item>
+ <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+ <a>鍒犻櫎</a>
+ </a-popconfirm>
+ </a-menu-item>
+ </a-menu>
+ </a-dropdown>
+ </span>
+ <span slot="figureNum" slot-scope="text, record">
+ <span v-if="record.materialNumber == null || '' == record.materialNumber">鏃犳暟鎹�</span>
+ <span v-else>
+ <a-popover placement="top" :title="'鐗╂枡鍩烘湰淇℃伅:'" arrow-point-at-center>
+ <template slot="content">
+ </template>
+ <a-button class="fontweight" style="font-weight: bold;color: inherit;" @click="handleMaterialClick(record)">
+ {{ record.materialNumber }}
+ </a-button>
+ </a-popover>
+ </span>
+ </span>
+ </a-table>
+ </div>
+
+ <pms-process-bill-materials-modal ref="modalForm" @ok="modalFormOk"></pms-process-bill-materials-modal>
+ <PmsProcessBillMaterialsDetailModal ref="PmsProcessBillMaterialsDetailModal"></PmsProcessBillMaterialsDetailModal>
+ </a-card>
+</template>
+
+<script>
+
+ import '@/assets/less/TableExpand.less'
+ import { mixinDevice } from '@/utils/mixin'
+ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+ import PmsProcessBillMaterialsModal from './modules/PmsProcessBillMaterialsModal'
+ import PmsProcessBillMaterialsDetailModal from './modules/PmsProcessBillMaterialsDetailModal.vue'
+ import { getAction } from '@api/manage'
+
+ export default {
+ name: 'PmsProcessBillMaterialsList',
+ mixins:[JeecgListMixin, mixinDevice],
+ components: {
+ PmsProcessBillMaterialsModal,
+ PmsProcessBillMaterialsDetailModal
+ },
+ data () {
+ return {
+ description: '璁㈠崟BOM绠$悊椤甸潰',
+ // 琛ㄥご
+ columns: [
+ {
+ title: '#',
+ dataIndex: '',
+ key:'rowIndex',
+ width:60,
+ align:"center",
+ customRender:function (t,r,index) {
+ return parseInt(index)+1;
+ }
+ },
+ {
+ title:'鐢熸垚璁㈠崟ID',
+ align:"center",
+ dataIndex: 'orderId'
+ },
+ {
+ title:'鐗╂枡缂栫爜',
+ align:"center",
+ dataIndex: 'materialNumber',
+ defaultSortOrder: 'descend',
+ scopedSlots: { customRender: 'figureNum', },
+ },
+ {
+ title:'鐗╂枡鍚嶇О',
+ align:"center",
+ dataIndex: 'materialName'
+ },
+ {
+ title:'BOM浠g爜',
+ align:"center",
+ dataIndex: 'billMaterialsCode'
+ },
+ {
+ title:'鍩烘湰鍗曚綅',
+ align:"center",
+ dataIndex: 'productionUnit'
+ },
+ {
+ title:'璁㈠崟鏁伴噺',
+ align:"center",
+ dataIndex: 'productionQuantity'
+ },
+ {
+ title: '鎿嶄綔',
+ dataIndex: 'action',
+ align:"center",
+ fixed:"right",
+ width:147,
+ scopedSlots: { customRender: 'action' }
+ }
+ ],
+ url: {
+ list: "/pmsprocessbillmaterials/pmsProcessBillMaterials/list",
+ delete: "/pmsprocessbillmaterials/pmsProcessBillMaterials/delete",
+ deleteBatch: "/pmsprocessbillmaterials/pmsProcessBillMaterials/deleteBatch",
+ exportXlsUrl: "/pmsprocessbillmaterials/pmsProcessBillMaterials/exportXls",
+ importExcelUrl: "pmsprocessbillmaterials/pmsProcessBillMaterials/importExcel",
+ queryByMaterialId:'/pms/pmsProcessBillMaterialsDetail/queryByMaterialId'
+ },
+ dictOptions:{},
+ superFieldList:[],
+ }
+ },
+ created() {
+ this.getSuperFieldList();
+ },
+ computed: {
+ importExcelUrl: function(){
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+ },
+ },
+ methods: {
+ handleMaterialClick(record){
+ console.log('record----->',record)
+ getAction(this.url.queryByMaterialId,{'materialId':record.id}).then(res=>{
+ if(res.success){
+ this.$refs.PmsProcessBillMaterialsDetailModal.edit(res.result);
+ this.$refs.PmsProcessBillMaterialsDetailModal.title="鐗╂枡娓呭崟";
+ this.$refs.PmsProcessBillMaterialsDetailModal.disableSubmit = true;
+ }else{
+ this.$message.error('娌℃煡鍒版暟鎹紝璇疯仈绯荤鐞嗗憳')
+ }
+ })
+ },
+ initDictConfig(){
+ },
+ getSuperFieldList(){
+ let fieldList=[];
+ fieldList.push({type:'int',value:'delFlag',text:'鍒犻櫎鏍囪',dictCode:''})
+ fieldList.push({type:'string',value:'orderId',text:'鐢熸垚璁㈠崟ID',dictCode:''})
+ fieldList.push({type:'string',value:'materialNumber',text:'鐗╂枡缂栫爜',dictCode:''})
+ fieldList.push({type:'string',value:'materialName',text:'鐗╂枡鍚嶇О',dictCode:''})
+ fieldList.push({type:'string',value:'billMaterialsCode',text:'BOM浠g爜',dictCode:''})
+ fieldList.push({type:'string',value:'productionUnit',text:'鍩烘湰鍗曚綅',dictCode:''})
+ fieldList.push({type:'double',value:'productionQuantity',text:'璁㈠崟鏁伴噺',dictCode:''})
+ this.superFieldList = fieldList
+ }
+ }
+ }
+</script>
+<style scoped>
+ @import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/pms/modules/PmsMaterialProcessForm.vue b/src/views/pms/modules/PmsMaterialProcessForm.vue
new file mode 100644
index 0000000..d76e154
--- /dev/null
+++ b/src/views/pms/modules/PmsMaterialProcessForm.vue
@@ -0,0 +1,172 @@
+<template>
+ <a-spin :spinning="confirmLoading">
+ <j-form-container :disabled="formDisabled">
+ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+ <a-row>
+ <a-col :span="12">
+ <a-form-model-item label="鐗╂枡缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber">
+ <a-input v-model="model.materialNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鐗╂枡鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName">
+ <a-input v-model="model.materialName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="浜х嚎ID(SAP宸ヤ綔涓績)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId">
+ <a-row :gutter="24">
+ <a-col :span="24">
+ <a-form-item
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ label=""
+ >
+ <j-select-factory
+ :disabled="disabled"
+ v-model="model.factoryId"
+ :multi="true"
+ @back="backFactoryInfo"
+ :backProduction="true"
+ :treeProductOpera="true"
+ ></j-select-factory>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="宸ュ簭鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processCode">
+ <a-input v-model="model.processCode" placeholder="璇疯緭鍏ュ伐搴忓彿" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="宸ュ簭鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processName">
+ <a-input v-model="model.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鎺у埗鐮�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="controlCode">
+ <a-input v-model="model.controlCode" placeholder="璇疯緭鍏ユ帶鍒剁爜" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ </a-row>
+ </a-form-model>
+ </j-form-container>
+ </a-spin>
+</template>
+
+<script>
+
+ import { httpAction, getAction } from '@/api/manage'
+ import { validateDuplicateValue } from '@/utils/util'
+ import JSelectFactory from '@comp/jeecgbiz/JSelectFactory.vue'
+ import JTreeDict from '@/components/jeecg/JTreeDict'//鍒嗙被瀛楀吀鏍戝舰涓嬫媺缁勪欢
+
+ export default {
+ name: 'PmsMaterialProcessForm',
+ components: {
+ JSelectFactory,
+ JTreeDict
+ },
+ props: {
+ //琛ㄥ崟绂佺敤
+ disabled: {
+ type: Boolean,
+ default: false,
+ required: false
+ }
+ },
+ data () {
+ return {
+ model:{
+ },
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 5 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
+ confirmLoading: false,
+ validatorRules: {
+ factoryId: [
+ { required: true, message: '浜х嚎鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialNumber: [
+ { required: true, message: '鐗╂枡缂栫爜鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialName: [
+ { required: true, message: '鐗╂枡鍚嶇О鏄繀閫夐」', trigger: 'change' }
+ ],
+ processCode: [
+ { required: true, message: '宸ュ簭鍙锋槸蹇呴�夐」', trigger: 'change' }
+ ],
+ processName: [
+ { required: true, message: '宸ュ簭鍚嶇О鏄繀閫夐」', trigger: 'change' }
+ ],
+ },
+ url: {
+ add: "/pms/pmsMaterialProcess/add",
+ edit: "/pms/pmsMaterialProcess/edit",
+ queryById: "/pms/pmsMaterialProcess/queryById"
+ }
+ }
+ },
+ computed: {
+ formDisabled(){
+ return this.disabled
+ },
+ },
+ created () {
+ //澶囦唤model鍘熷鍊�
+ this.modelDefault = JSON.parse(JSON.stringify(this.model));
+ },
+ methods: {
+ backFactoryInfo(info) {
+ this.model.factoryIds = this.model.factoryId
+ this.nextFactoryOptions = info.map((item, index, arr) => {
+ let c = { label: item.text, value: item.value + '' }
+ return c
+ })
+ },
+ add () {
+ this.edit(this.modelDefault);
+ },
+ edit (record) {
+ this.model = Object.assign({}, record);
+ this.visible = true;
+ },
+ submitForm () {
+ const that = this;
+ // 瑙﹀彂琛ㄥ崟楠岃瘉
+ this.$refs.form.validate(valid => {
+ if (valid) {
+ that.confirmLoading = true;
+ let httpurl = '';
+ let method = '';
+ if(!this.model.id){
+ httpurl+=this.url.add;
+ method = 'post';
+ }else{
+ httpurl+=this.url.edit;
+ method = 'put';
+ }
+ httpAction(httpurl,this.model,method).then((res)=>{
+ if(res.success){
+ that.$message.success(res.message);
+ that.$emit('ok');
+ }else{
+ that.$message.warning(res.message);
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ })
+ }
+
+ })
+ },
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/pms/modules/PmsMaterialProcessModal.vue b/src/views/pms/modules/PmsMaterialProcessModal.vue
new file mode 100644
index 0000000..c207816
--- /dev/null
+++ b/src/views/pms/modules/PmsMaterialProcessModal.vue
@@ -0,0 +1,60 @@
+<template>
+ <j-modal
+ :title="title"
+ :width="width"
+ :visible="visible"
+ switchFullscreen
+ @ok="handleOk"
+ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+ @cancel="handleCancel"
+ cancelText="鍏抽棴">
+ <pms-material-process-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-material-process-form>
+ </j-modal>
+</template>
+
+<script>
+
+ import PmsMaterialProcessForm from './PmsMaterialProcessForm'
+ export default {
+ name: 'PmsMaterialProcessModal',
+ components: {
+ PmsMaterialProcessForm
+ },
+ data () {
+ return {
+ title:'',
+ width:896,
+ visible: false,
+ disableSubmit: false
+ }
+ },
+ methods: {
+ add () {
+ this.visible=true
+ this.$nextTick(()=>{
+ this.$refs.realForm.add();
+ })
+ },
+ edit (record) {
+ this.visible=true
+ this.$nextTick(()=>{
+ this.$refs.realForm.edit(record);
+ })
+ },
+ close () {
+ this.$emit('close');
+ this.visible = false;
+ },
+ handleOk () {
+ this.$refs.realForm.submitForm();
+ },
+ submitCallback(){
+ this.$emit('ok');
+ this.visible = false;
+ },
+ handleCancel () {
+ this.close()
+ }
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/pms/modules/PmsProcessBillMaterialsDetailForm.vue b/src/views/pms/modules/PmsProcessBillMaterialsDetailForm.vue
new file mode 100644
index 0000000..eaa6351
--- /dev/null
+++ b/src/views/pms/modules/PmsProcessBillMaterialsDetailForm.vue
@@ -0,0 +1,141 @@
+<template>
+ <a-spin :spinning="confirmLoading">
+ <j-form-container :disabled="formDisabled">
+ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+ <a-row>
+ <a-col :span="12">
+ <a-form-model-item label="鐢熶骇鐗╂枡ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialId">
+ <j-search-select-tag v-model="model.materialId" placeholder="璇疯緭鍏ョ敓浜х墿鏂橧D" dict="pms_process_bill_materials,material_number,id" @change="handleMaterialChange"></j-search-select-tag>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鐗╂枡缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber">
+ <a-input v-model="model.materialNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鐗╂枡鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName">
+ <a-input v-model="model.materialName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="闇�姹傜敤閲�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="usageUnit">
+ <a-input-number v-model="model.usageUnit" placeholder="璇疯緭鍏ラ渶姹傜敤閲�" style="width: 100%" />
+ </a-form-model-item>
+ </a-col>
+ </a-row>
+ </a-form-model>
+ </j-form-container>
+ </a-spin>
+</template>
+
+<script>
+
+ import { httpAction, getAction } from '@/api/manage'
+ import { validateDuplicateValue } from '@/utils/util'
+
+ export default {
+ name: 'PmsProcessBillMaterialsDetailForm',
+ components: {
+ },
+ props: {
+ //琛ㄥ崟绂佺敤
+ disabled: {
+ type: Boolean,
+ default: false,
+ required: false
+ }
+ },
+ data () {
+ return {
+ model:{
+ },
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 5 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
+ confirmLoading: false,
+ validatorRules: {
+ materialId: [
+ { required: true, message: '鐢熶骇鐗╂枡ID鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialNumber: [
+ { required: true, message: '鐗╂枡缂栫爜鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialName: [
+ { required: true, message: '鐗╂枡鍚嶇О鏄繀閫夐」', trigger: 'change' }
+ ],
+ usageUnit: [
+ { required: true, message: '闇�姹傜敤閲忔槸蹇呴�夐」', trigger: 'change' }
+ ],
+ },
+ url: {
+ add: "/pms/pmsProcessBillMaterialsDetail/add",
+ edit: "/pms/pmsProcessBillMaterialsDetail/edit",
+ queryById: "/pms/pmsProcessBillMaterialsDetail/queryById",
+ queryPmsProcessBillMaterials:"/pmsprocessbillmaterials/pmsProcessBillMaterials/queryById"
+ }
+ }
+ },
+ computed: {
+ formDisabled(){
+ return this.disabled
+ },
+ },
+ created () {
+ //澶囦唤model鍘熷鍊�
+ this.modelDefault = JSON.parse(JSON.stringify(this.model));
+ },
+ methods: {
+ async handleMaterialChange(value){
+ console.log('value---->',value)
+ this.confirmLoading = true
+ const res = await getAction(this.url.queryPmsProcessBillMaterials,{'id':value})
+ console.log('res.result---->',res.result)
+ this.model.materialNumber = res.result.materialNumber
+ this.model.materialName = res.result.materialName
+ this.confirmLoading = false
+ },
+ add () {
+ this.edit(this.modelDefault);
+ },
+ edit (record) {
+ this.model = Object.assign({}, record);
+ this.visible = true;
+ },
+ submitForm () {
+ const that = this;
+ // 瑙﹀彂琛ㄥ崟楠岃瘉
+ this.$refs.form.validate(valid => {
+ if (valid) {
+ that.confirmLoading = true;
+ let httpurl = '';
+ let method = '';
+ if(!this.model.id){
+ httpurl+=this.url.add;
+ method = 'post';
+ }else{
+ httpurl+=this.url.edit;
+ method = 'put';
+ }
+ httpAction(httpurl,this.model,method).then((res)=>{
+ if(res.success){
+ that.$message.success(res.message);
+ that.$emit('ok');
+ }else{
+ that.$message.warning(res.message);
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ })
+ }
+
+ })
+ },
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/pms/modules/PmsProcessBillMaterialsDetailModal.vue b/src/views/pms/modules/PmsProcessBillMaterialsDetailModal.vue
new file mode 100644
index 0000000..e0e6743
--- /dev/null
+++ b/src/views/pms/modules/PmsProcessBillMaterialsDetailModal.vue
@@ -0,0 +1,60 @@
+<template>
+ <j-modal
+ :title="title"
+ :width="width"
+ :visible="visible"
+ switchFullscreen
+ @ok="handleOk"
+ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+ @cancel="handleCancel"
+ cancelText="鍏抽棴">
+ <pms-process-bill-materials-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-process-bill-materials-detail-form>
+ </j-modal>
+</template>
+
+<script>
+
+ import PmsProcessBillMaterialsDetailForm from './PmsProcessBillMaterialsDetailForm'
+ export default {
+ name: 'PmsProcessBillMaterialsDetailModal',
+ components: {
+ PmsProcessBillMaterialsDetailForm
+ },
+ data () {
+ return {
+ title:'',
+ width:896,
+ visible: false,
+ disableSubmit: false
+ }
+ },
+ methods: {
+ add () {
+ this.visible=true
+ this.$nextTick(()=>{
+ this.$refs.realForm.add();
+ })
+ },
+ edit (record) {
+ this.visible=true
+ this.$nextTick(()=>{
+ this.$refs.realForm.edit(record);
+ })
+ },
+ close () {
+ this.$emit('close');
+ this.visible = false;
+ },
+ handleOk () {
+ this.$refs.realForm.submitForm();
+ },
+ submitCallback(){
+ this.$emit('ok');
+ this.visible = false;
+ },
+ handleCancel () {
+ this.close()
+ }
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/pms/modules/PmsProcessBillMaterialsForm.vue b/src/views/pms/modules/PmsProcessBillMaterialsForm.vue
new file mode 100644
index 0000000..68e2d88
--- /dev/null
+++ b/src/views/pms/modules/PmsProcessBillMaterialsForm.vue
@@ -0,0 +1,144 @@
+<template>
+ <a-spin :spinning="confirmLoading">
+ <j-form-container :disabled="formDisabled">
+ <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+ <a-row>
+ <a-col :span="12">
+ <a-form-model-item label="鐢熸垚璁㈠崟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
+ <a-input v-model="model.orderId" placeholder="璇疯緭鍏ョ敓鎴愯鍗旾D" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鐗╂枡缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialNumber">
+ <a-input v-model="model.materialNumber" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鐗╂枡鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName">
+ <a-input v-model="model.materialName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="BOM浠g爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="billMaterialsCode">
+ <a-input v-model="model.billMaterialsCode" placeholder="璇疯緭鍏OM浠g爜" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="鍩烘湰鍗曚綅" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionUnit">
+ <a-input v-model="model.productionUnit" placeholder="璇疯緭鍏ュ熀鏈崟浣�" ></a-input>
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="12">
+ <a-form-model-item label="璁㈠崟鏁伴噺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionQuantity">
+ <a-input-number v-model="model.productionQuantity" placeholder="璇疯緭鍏ヨ鍗曟暟閲�" style="width: 100%" />
+ </a-form-model-item>
+ </a-col>
+ </a-row>
+ </a-form-model>
+ </j-form-container>
+ </a-spin>
+</template>
+
+<script>
+
+ import { httpAction, getAction } from '@/api/manage'
+ import { validateDuplicateValue } from '@/utils/util'
+
+ export default {
+ name: 'PmsProcessBillMaterialsForm',
+ components: {
+ },
+ props: {
+ //琛ㄥ崟绂佺敤
+ disabled: {
+ type: Boolean,
+ default: false,
+ required: false
+ }
+ },
+ data () {
+ return {
+ model:{
+ },
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 5 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 16 },
+ },
+ confirmLoading: false,
+ validatorRules: {
+ orderId: [
+ { required: true, message: '鐢熸垚璁㈠崟鏄繀閫夐」', trigger: 'change' }
+ ],
+ materialNumber: [
+ { required: true, message: '鐗╂枡缂栫爜鏄繀濉」', trigger: 'change' }
+ ],
+ materialName: [
+ { required: true, message: '鐗╂枡鍚嶇О鏄繀濉」', trigger: 'change' }
+ ],
+ productionUnit: [
+ { required: true, message: '鍩烘湰鍗曚綅鏄繀濉」', trigger: 'change' }
+ ],
+ productionQuantity: [
+ { required: true, message: '璁㈠崟鏁伴噺鏄繀濉」', trigger: 'change' }
+ ],
+ },
+ url: {
+ add: "/pmsprocessbillmaterials/pmsProcessBillMaterials/add",
+ edit: "/pmsprocessbillmaterials/pmsProcessBillMaterials/edit",
+ queryById: "/pmsprocessbillmaterials/pmsProcessBillMaterials/queryById"
+ }
+ }
+ },
+ computed: {
+ formDisabled(){
+ return this.disabled
+ },
+ },
+ created () {
+ //澶囦唤model鍘熷鍊�
+ this.modelDefault = JSON.parse(JSON.stringify(this.model));
+ },
+ methods: {
+ add () {
+ this.edit(this.modelDefault);
+ },
+ edit (record) {
+ this.model = Object.assign({}, record);
+ this.visible = true;
+ },
+ submitForm () {
+ const that = this;
+ // 瑙﹀彂琛ㄥ崟楠岃瘉
+ this.$refs.form.validate(valid => {
+ if (valid) {
+ that.confirmLoading = true;
+ let httpurl = '';
+ let method = '';
+ if(!this.model.id){
+ httpurl+=this.url.add;
+ method = 'post';
+ }else{
+ httpurl+=this.url.edit;
+ method = 'put';
+ }
+ httpAction(httpurl,this.model,method).then((res)=>{
+ if(res.success){
+ that.$message.success(res.message);
+ that.$emit('ok');
+ }else{
+ that.$message.warning(res.message);
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ })
+ }
+
+ })
+ },
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/pms/modules/PmsProcessBillMaterialsModal.vue b/src/views/pms/modules/PmsProcessBillMaterialsModal.vue
new file mode 100644
index 0000000..806a2e2
--- /dev/null
+++ b/src/views/pms/modules/PmsProcessBillMaterialsModal.vue
@@ -0,0 +1,60 @@
+<template>
+ <j-modal
+ :title="title"
+ :width="width"
+ :visible="visible"
+ switchFullscreen
+ @ok="handleOk"
+ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+ @cancel="handleCancel"
+ cancelText="鍏抽棴">
+ <pms-process-bill-materials-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></pms-process-bill-materials-form>
+ </j-modal>
+</template>
+
+<script>
+
+ import PmsProcessBillMaterialsForm from './PmsProcessBillMaterialsForm'
+ export default {
+ name: 'PmsProcessBillMaterialsModal',
+ components: {
+ PmsProcessBillMaterialsForm
+ },
+ data () {
+ return {
+ title:'',
+ width:896,
+ visible: false,
+ disableSubmit: false
+ }
+ },
+ methods: {
+ add () {
+ this.visible=true
+ this.$nextTick(()=>{
+ this.$refs.realForm.add();
+ })
+ },
+ edit (record) {
+ this.visible=true
+ this.$nextTick(()=>{
+ this.$refs.realForm.edit(record);
+ })
+ },
+ close () {
+ this.$emit('close');
+ this.visible = false;
+ },
+ handleOk () {
+ this.$refs.realForm.submitForm();
+ },
+ submitCallback(){
+ this.$emit('ok');
+ this.visible = false;
+ },
+ handleCancel () {
+ this.close()
+ }
+ }
+ }
+</script>
\ No newline at end of file
--
Gitblit v1.9.3