|
@@ -18,7 +18,7 @@
|
|
|
v-decorator="['outNo', {rules: [{required: false, message: '出库单号不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+<!-- <a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="领用/退货单号"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -37,20 +37,26 @@
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
>
|
|
|
- <a-input
|
|
|
- disabled
|
|
|
- style="width:70%"
|
|
|
- v-decorator="['storeName', {rules: [{required: true, message: '仓库不能为空'}]}]" />
|
|
|
- <a-button type="primary" style="width:30%" @click="handleStoreSelect">选择仓库</a-button>
|
|
|
+ <a-tree-select
|
|
|
+ style="width: 100%"
|
|
|
+ @change="handleStoreChange"
|
|
|
+ :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
+ :treeData="storeTreeDate"
|
|
|
+ :treeNodeFilterProp="'title'"
|
|
|
+ :showSearch="true"
|
|
|
+ v-decorator="['storeId', {rules: [{required: false, message: '仓库不能为空'}]}]"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ </a-tree-select>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col>-->
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="出库类型"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
>
|
|
|
- <a-select @change="typeChange" v-decorator="['type', {rules: [{required: true, message: '出库类型不能为空'}]}]" placeholder="请选择">
|
|
|
+ <a-select @change="typeChange" v-decorator="['type', {initValue: 1, rules: [{required: true, message: '出库类型不能为空'}]}]" placeholder="请选择">
|
|
|
<a-select-option
|
|
|
v-for="(label,value) in typeMap"
|
|
|
:key="value"
|
|
@@ -60,7 +66,7 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :lg="12" :md="24" :sm="24">
|
|
|
+<!-- <a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="操作人"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
@@ -75,7 +81,7 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col>-->
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
|
<a-form-item
|
|
|
label="操作时间"
|
|
@@ -85,7 +91,7 @@
|
|
|
<a-date-picker
|
|
|
style="width: 100%"
|
|
|
:format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
- v-decorator="['userTime']" />
|
|
|
+ v-decorator="['userTime', {rules: [{required: true, message: '操作时间不能为空'}]}]" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :lg="12" :md="24" :sm="24">
|
|
@@ -165,8 +171,9 @@ import DetailBaseForm from './DetailBaseForm'
|
|
|
import StoreSelectModal from '@/views/store/store/modules/StoreSelectModal'
|
|
|
import SpareStoreSelectModal from '@/views/store/sparestore/modules/SpareStoreSelectModal'
|
|
|
import BaseFormForModify from '@/views/store/outstoredetail/modules/BaseFormForModify'
|
|
|
-import BaseTool from "@/utils/tool";
|
|
|
-import {queryUsersByParentDeptNatureAll} from "@/api/upms/user";
|
|
|
+import BaseTool from '@/utils/tool'
|
|
|
+import { queryUsersByParentDeptNatureAll } from '@/api/upms/user'
|
|
|
+import { fetchStoreTree } from '@/api/store/store'
|
|
|
|
|
|
export default {
|
|
|
name: 'BaseOutStoreForm',
|
|
@@ -237,6 +244,10 @@ export default {
|
|
|
return this.BaseTool.Amount.formatter(text)
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '所在仓库',
|
|
|
+ dataIndex: 'storeName'
|
|
|
+ },
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
@@ -245,6 +256,7 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
data: [],
|
|
|
+ storeTreeDate: [],
|
|
|
userList: {},
|
|
|
user: this.$store.getters.userInfo,
|
|
|
selectedRowKeys: [],
|
|
@@ -276,6 +288,9 @@ export default {
|
|
|
queryUsersByParentDeptNatureAll(params).then(res => {
|
|
|
this.userList = res.data
|
|
|
})
|
|
|
+ fetchStoreTree().then(res => {
|
|
|
+ this.storeTreeDate = res.data
|
|
|
+ })
|
|
|
// 如果是空标识添加
|
|
|
if (this.BaseTool.Object.isBlank(record)) {
|
|
|
this.modalTitle = '添加'
|
|
@@ -418,7 +433,7 @@ export default {
|
|
|
this.data = data.filter(item => id !== item.id)
|
|
|
},
|
|
|
handleSpareStoreSelect () {
|
|
|
- this.$refs.spareStoreSelectModal.base({}, { storeId: this.storeId, num: 0 })
|
|
|
+ this.$refs.spareStoreSelectModal.base({}, { num: 0 })
|
|
|
},
|
|
|
handleSpareStoreSelected (record, keys, rows) {
|
|
|
const { data } = this
|
|
@@ -434,10 +449,15 @@ export default {
|
|
|
const selectData = rows[i]
|
|
|
selectData.num = 1
|
|
|
selectData.totalPrice = selectData.price
|
|
|
+ selectData.storeId = rows[i].storeId
|
|
|
+ selectData.storeName = rows[i].storeName
|
|
|
data.push(selectData)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ handleStoreChange (value) {
|
|
|
+ this.storeId = value
|
|
|
+ },
|
|
|
handleBaseFormForModifySelect (record) {
|
|
|
this.$refs.baseFormForModify.base(record)
|
|
|
},
|