|
@@ -41,6 +41,7 @@
|
|
|
</el-tabs>
|
|
|
</zj-form-module>
|
|
|
<zj-form-module
|
|
|
+ v-if="formData.isPlan"
|
|
|
title="计划单明细"
|
|
|
label-width="100px"
|
|
|
:form-data="formData"
|
|
@@ -106,6 +107,7 @@ import storage_codes from '../mixins/storage_codes'
|
|
|
import common from '../mixins/common_code'
|
|
|
import jihuamingxi from '../mixins/jihuamingxi'
|
|
|
import { delayPerform, firstPerform, intervalPerform, passivePerform, queuePerform } from 'js-perform-lock'
|
|
|
+import { required, diyRequired } from '@/components/template/rules_verify.js'
|
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
|
mixins: [import_mixin, operation_mixin, form_ty, storage_table, storage_goods, storage_codes, common, jihuamingxi],
|
|
@@ -160,7 +162,8 @@ export default {
|
|
|
fileUrl: [],
|
|
|
items: [],
|
|
|
planItems: [],
|
|
|
- codeInfoList: []
|
|
|
+ codeInfoList: [],
|
|
|
+ isPlan: ''
|
|
|
},
|
|
|
activeName: 'goodsInfo',
|
|
|
goods_material_id: '',
|
|
@@ -204,9 +207,10 @@ export default {
|
|
|
isShow: true,
|
|
|
name: 'slot-component',
|
|
|
formItemAttributes: {
|
|
|
- label: '',
|
|
|
- prop: '',
|
|
|
- 'label-width': '0px'
|
|
|
+ label: '计划单明细',
|
|
|
+ prop: 'planItems',
|
|
|
+ 'label-width': '0px',
|
|
|
+ rules: this.formData.isPlan ? [...required] : []
|
|
|
},
|
|
|
render: (h, { props, onInput }) => {
|
|
|
var { value } = props
|
|
@@ -474,16 +478,19 @@ export default {
|
|
|
message: '仓库不能为空'
|
|
|
})
|
|
|
}
|
|
|
- try {
|
|
|
- this.formData.planItems.map((item, index) => {
|
|
|
- if (!item.recQty || item.recQty == 0) {
|
|
|
- throw new Error('')
|
|
|
- }
|
|
|
- })
|
|
|
- } catch (error) {
|
|
|
- this.$message.warning('到货数量必须填写并且大于0')
|
|
|
- return false
|
|
|
+ if (this.formData.isPlan) {
|
|
|
+ try {
|
|
|
+ this.formData.planItems.map((item, index) => {
|
|
|
+ if (!item.recQty || item.recQty == 0) {
|
|
|
+ throw new Error('')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.warning('到货数量必须填写并且大于0')
|
|
|
+ return false
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
goodsPurchaseAdd({
|
|
|
...this.formData,
|
|
|
items: this.formData.items.map((item, index) => ({ ...item, index: index + 1 })),
|