修改
This commit is contained in:
@@ -98,6 +98,25 @@
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="移入仓库" prop="out_stor_id" v-if="form.bill_type === '1004'">
|
||||
<label slot="label">移入仓库:</label>
|
||||
<el-select
|
||||
v-model="form.out_stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="storChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inStorList"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
@@ -255,6 +274,7 @@ const defaultForm = {
|
||||
bill_type: '',
|
||||
remark: '',
|
||||
biz_date: new Date(),
|
||||
out_stor_id: '',
|
||||
create_mode: '',
|
||||
tableData: []
|
||||
}
|
||||
@@ -279,6 +299,7 @@ export default {
|
||||
nowrow: {},
|
||||
nowindex: '',
|
||||
storlist: [],
|
||||
inStorList: [],
|
||||
invtypelist: [],
|
||||
rules: {
|
||||
stor_id: [
|
||||
@@ -305,15 +326,28 @@ export default {
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
crudUserStor.queryStor({}).then(res => {
|
||||
this.inStorList = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (this.form.bill_type !== '1004') {
|
||||
this.form.out_stor_id = ''
|
||||
}
|
||||
if (this.form.bill_type === '1004') {
|
||||
if (this.form.out_stor_id === this.form.stor_id) {
|
||||
this.crud.notify('移出仓库和移入仓库不能一致!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
checkoutbill.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user