Sfoglia il codice sorgente

物料属性添加商品条码

hcf 1 anno fa
parent
commit
5b36ec720c

+ 32 - 0
src/views/audit/productManagement/index.vue

@@ -277,6 +277,9 @@
 					],
 					skuCode: [
 						{ required: true, message: '请输入物料编码'}
+					],
+					barCode: [
+						{ required: true, message: '请输入商品条码'}
 					]
 				}
 			},
@@ -317,6 +320,18 @@
 						},
 					}
 				},
+				{
+					// width: '150px',
+					title: '商品条码(必填项)',
+					field: 'barCode',
+					component: 'by-input',
+					compConfig: {
+						attr: {
+							size: 'mini',
+							placeholder: ' '
+						},
+					}
+				},
 				// {
 				// 	width: '55px',
 				// 	component: selectKin
@@ -480,6 +495,9 @@
 					],
 					skuCode: [
 						{ required: true, message: '请输入物料编码'}
+					],
+					barCode: [
+						{ required: true, message: '请输入商品条码'}
 					]
 				}
 			},
@@ -520,6 +538,18 @@
 						},
 					}
 				},
+				{
+					width: '150px',
+					title: '商品条码(必填项)',
+					field: 'barCode',
+					component: 'by-input',
+					compConfig: {
+						attr: {
+							size: 'mini',
+							placeholder: ' '
+						},
+					}
+				},
 				// {
 				// 	width: '55px',
 				// 	component: selectKin
@@ -1229,6 +1259,7 @@
 						(this.$refs.table as any).validate();
 						if (!v.skuTitle) return this.$message.warning('物料标题必填');
 						if (!v.skuCode) return this.$message.warning('物料编码必填');
+						if (!v.barCode) return this.$message.warning('物料属性的商品条码需必填');
 						// if(v.weight&&v.weight!=0){
 						// 	v.weight = v.weight/1000
 						// }
@@ -1277,6 +1308,7 @@
 						(this.$refs.singeTable as any).validate();
 						if (!v.skuTitle) return this.$message.warning('物料属性的标题需必填');
 						if (!v.skuCode) return this.$message.warning('物料属性的物料编码需必填');
+						if (!v.barCode) return this.$message.warning('物料属性的商品条码需必填');
 						
 						// if(v.weight&&v.weight!=0){
 						// 	v.weight = v.weight/1000

+ 22 - 1
src/views/audit/sku/index.vue

@@ -8,7 +8,7 @@
 		<!-- 新增/编辑弹窗 -->
 		<div class="detail" v-show="isShow==='detail'" key="index2">
 			<by-tool :propConfig="toolConfig" @clickHandle="insideTools" />
-			<div class="box-shadow">
+			<div class="box-shadow" style="height: 100%;">
 				<by-table :propConfig="skuConfig" @onChangeRow="getInputValue" ref="addFormId"></by-table>
 			</div>
 		</div>
@@ -51,6 +51,9 @@
 					],
 					skuCode: [
 						{ required: true, message: '请输入物料编码'}
+					],
+					barCode: [
+						{ required: true, message: '请输入商品条码'}
 					]
 				}
 			},
@@ -94,6 +97,18 @@
 					}
 
 				},
+				{
+					width: '140px',
+					title: '商品条码(必填项)',
+					field: 'barCode',
+					component: 'by-input',
+					compConfig: {
+						attr: {
+							size: 'mini',
+							placeholder: ' '
+						},
+					}
+				},
 				{
 					width: '140px',
 					title: '财务编号',
@@ -298,6 +313,11 @@
 						title: '物料编码',
 						field: 'skuCode',
 					},
+					{
+						width: '140px',
+						title: '商品条码',
+						field: 'barCode',
+					},
 					{
 						width: '140px',
 						title: '财务编号',
@@ -435,6 +455,7 @@
 			(this.$refs.addFormId as any).validate();
 			if (!data[0].skuTitle) return this.$message.warning('物料标题不能为空');
 			if (!data[0].skuCode) return this.$message.warning('物料编号不能为空');
+			if (!data[0].barCode) return this.$message.warning('物料属性的商品条码需必填');
 			api.updateList(data[0], 'maindataMaterialSku').then((res : any) => {
 				if (res.code === 200) {
 					this.$message.success('编辑成功');