|
@@ -69,11 +69,20 @@
|
|
|
</ws-form-item>
|
|
|
<!--仓库所在地-->
|
|
|
<ws-form-item label="仓库所在地" span="1" prop="warehouseCity">
|
|
|
- <ws-input
|
|
|
+ <!-- <ws-input
|
|
|
v-model="deptBudgetList.warehouseCity"
|
|
|
placeholder="请输入仓库所在地"
|
|
|
maxlength="120"
|
|
|
size="small"
|
|
|
+ /> -->
|
|
|
+ <el-cascader
|
|
|
+ :options="options_"
|
|
|
+ v-model="selectedOptions"
|
|
|
+ clearable
|
|
|
+ size="large"
|
|
|
+ placeholder="请输入仓库所在地"
|
|
|
+ style="width: 200%"
|
|
|
+ @change="handleChange"
|
|
|
/>
|
|
|
</ws-form-item>
|
|
|
<!--详细地址-->
|
|
@@ -195,7 +204,9 @@ import {
|
|
|
getLook,
|
|
|
edit,
|
|
|
delPosition,
|
|
|
+ getstaff,
|
|
|
} from '@/model/warehouse/index'
|
|
|
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
|
|
|
import { downloadFile } from '@/utils/batchDown'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import WsUpload from '@/components/WsUpload'
|
|
@@ -243,6 +254,8 @@ export default {
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
size: 10,
|
|
|
+ options_: regionData,
|
|
|
+ selectedOptions: [],
|
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
|
deptCircularPage: {},
|
|
|
packtypeList: [],
|
|
@@ -289,8 +302,12 @@ export default {
|
|
|
this.deptBudgetList = {}
|
|
|
this.$router.push({ path: 'warehouseManagementList' })
|
|
|
},
|
|
|
+ handleChange(value) {
|
|
|
+ this.selectedOptions = value
|
|
|
+ },
|
|
|
warehouseTypechange() {
|
|
|
this.deptBudgetList = {}
|
|
|
+ this.selectedOptions = []
|
|
|
this.loaddata()
|
|
|
},
|
|
|
marker: function (item) {
|
|
@@ -380,6 +397,11 @@ export default {
|
|
|
.then((response) => {
|
|
|
this.packtypeList = response
|
|
|
})
|
|
|
+ getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ console.log(response)
|
|
|
+ })
|
|
|
},
|
|
|
getUnitList() {
|
|
|
xiala({
|
|
@@ -409,6 +431,15 @@ export default {
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
+ var tmp = []
|
|
|
+ tmp[0] = TextToCode[response.warehousePrivate].code
|
|
|
+ tmp[1] =
|
|
|
+ TextToCode[response.warehousePrivate][response.warehouseCity].code
|
|
|
+ tmp[2] =
|
|
|
+ TextToCode[response.warehousePrivate][response.warehouseCity][
|
|
|
+ response.warehouseArea
|
|
|
+ ].code
|
|
|
+ this.selectedOptions = tmp
|
|
|
this.deptBudgetList = response
|
|
|
})
|
|
|
},
|
|
@@ -518,6 +549,12 @@ export default {
|
|
|
}
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.deptBudgetList.warehousePrivate =
|
|
|
+ CodeToText[this.selectedOptions[0]]
|
|
|
+ this.deptBudgetList.warehouseCity =
|
|
|
+ CodeToText[this.selectedOptions[1]]
|
|
|
+ this.deptBudgetList.warehouseArea =
|
|
|
+ CodeToText[this.selectedOptions[2]]
|
|
|
this.deptBudgetList.warehouseType = this.warehouseType
|
|
|
this.deptBudgetList.baseId = this.baseId
|
|
|
this.deptBudgetList.compId = this.compId
|
|
@@ -527,6 +564,7 @@ export default {
|
|
|
.then((response) => {
|
|
|
this.$message.success('编辑成功')
|
|
|
this.deptBudgetList = {}
|
|
|
+ this.warehouseType = '1'
|
|
|
this.$router.push({ path: 'warehouseManagementList' })
|
|
|
})
|
|
|
} else {
|