|
@@ -1,4 +1,4 @@
|
|
|
-import { required } from '@/components/template/rules_verify.js'
|
|
|
+import { required, diyRequired } from '@/components/template/rules_verify.js'
|
|
|
import { listPageV2 } from '@/api/auxiliaryFittings/supplier'
|
|
|
import { goodsPurchaseList, goodsPurchaseDetail } from '@/api/goodsPurchasedStored.js'
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
@@ -52,7 +52,13 @@ export default {
|
|
|
>
|
|
|
<el-descriptions-item label="*供应商名称">
|
|
|
<div class="redbordererr">
|
|
|
- <el-form-item label="" lebel-width="0px" prop={`venderId`} rules={required}>
|
|
|
+ <el-form-item label="" lebel-width="0px" prop={`venderId`} rules={[diyRequired.bind(this)((rule, value)=>{
|
|
|
+ if(this.logs){
|
|
|
+ this.logs.push({errMsg:`*供应商名称不能为空`})
|
|
|
+ }
|
|
|
+ this?.tishicuowu?.()
|
|
|
+ return new Error('必须填写')
|
|
|
+ })]}>
|
|
|
<el-select
|
|
|
style="width:100%"
|
|
|
value={this.formData.venderId}
|
|
@@ -85,7 +91,13 @@ export default {
|
|
|
{!!~['merchandisePurchaseReturn'].indexOf(this?.$route?.name) ? (
|
|
|
<el-descriptions-item label="*采购入库单">
|
|
|
<div class="redbordererr">
|
|
|
- <el-form-item label="" lebel-width="0px" prop={`goodsPurchaseId`} rules={required}>
|
|
|
+ <el-form-item label="" lebel-width="0px" prop={`goodsPurchaseId`} rules={[diyRequired.bind(this)((rule, value)=>{
|
|
|
+ if(this.logs){
|
|
|
+ this.logs.push({errMsg:`*采购入库单不能为空`})
|
|
|
+ }
|
|
|
+ this?.tishicuowu?.()
|
|
|
+ return new Error('必须填写')
|
|
|
+ })]}>
|
|
|
<el-select
|
|
|
style="width:100%"
|
|
|
value={this.formData.goodsPurchaseId}
|