|
@@ -144,25 +144,40 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-row>
|
|
|
- <el-col
|
|
|
- :span="12"
|
|
|
- ><el-form-item label="凭证类型" prop="proof_type" label-width="85px">
|
|
|
- <el-select
|
|
|
- v-model="ruleForm.proof_type"
|
|
|
- placeholder="凭证类型"
|
|
|
- style="width: 100%"
|
|
|
- @change="set_proof_url()"
|
|
|
- >
|
|
|
+ <el-form-item label-width="85px" label="商品类型">
|
|
|
+ <el-select v-model="ruleForm.goodtype" style="width:100%" placeholder="商品类型">
|
|
|
<el-option
|
|
|
- v-for="item in proof_options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ v-for="goodType in goodTypes"
|
|
|
+ :key="goodType.value"
|
|
|
+ :disabled="(goodType.value === '1' && Number(ruleForm.sale_price) === 0)
|
|
|
+ ||(goodType.value !== '1' && Number(ruleForm.sale_price) !== 0)"
|
|
|
+ :value="goodType.value"
|
|
|
+ :label="goodType.label"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-col
|
|
|
+ :span="12"
|
|
|
+ >
|
|
|
+ <el-form-item label="凭证类型" prop="proof_type" label-width="85px">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.proof_type"
|
|
|
+ placeholder="凭证类型"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="set_proof_url()"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in proof_options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="到货时间" prop="arrtime" label-width="85px">
|
|
@@ -609,7 +624,8 @@ export default {
|
|
|
value === '0.00' ||
|
|
|
value === '0.000')
|
|
|
) {
|
|
|
- callback(new Error('不能为零!'))
|
|
|
+ // new Error('不能为零!')
|
|
|
+ callback()
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
@@ -656,6 +672,11 @@ export default {
|
|
|
video_url: '',
|
|
|
img_url: '',
|
|
|
other_url: '',
|
|
|
+ goodTypes: [
|
|
|
+ { value: '1', label: '常规商品' },
|
|
|
+ { value: '2', label: '赠品' },
|
|
|
+ { value: '3', label: '样品' }
|
|
|
+ ],
|
|
|
proof_options: [
|
|
|
{
|
|
|
value: '1',
|
|
@@ -816,6 +837,10 @@ export default {
|
|
|
if (!val) {
|
|
|
this.$emit('cancel')
|
|
|
}
|
|
|
+ },
|
|
|
+ 'ruleForm.sale_price'(val) {
|
|
|
+ // console.log(val)
|
|
|
+ this.ruleForm.goodtype = Number(val) === 0 ? '2' : '1'
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -859,7 +884,6 @@ export default {
|
|
|
async initForm() {
|
|
|
this.loading = true
|
|
|
this.rulesThis = this.rules
|
|
|
- console.log(this.sitem)
|
|
|
const { can } = this.sitem
|
|
|
this.sitem.can_name = ''
|
|
|
this.sitem.is_noble = false
|
|
@@ -910,7 +934,8 @@ export default {
|
|
|
remark: '',
|
|
|
proof_type: '1', // 通过or驳回
|
|
|
proof_url: '', // 驳回至
|
|
|
- companyNo: in_companyNo || ''
|
|
|
+ companyNo: in_companyNo || '',
|
|
|
+ goodtype: Number(sale_price) === 0 ? '2' : '1'
|
|
|
}
|
|
|
}
|
|
|
|