查询
@@ -68,12 +75,16 @@
+
-
-
+
+
+
+
+
@@ -100,6 +111,9 @@
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './warehouseAreaAdd.vue'
+ import {
+ typeValues,
+ } from '@/api/Common/dictcommons.js'
export default {
components: {
ButtonBar,
@@ -157,13 +171,15 @@
warehouseName: '',
zoneSid: '',
zoneName: '',
+ warehouseTypeValue: "",
}
},
warehouseList: [],
warehouseZoneList: [],
warehouseAreaTypeLsit: [],
sids: [],
- selectionList: []
+ selectionList: [],
+ warehouseTypeList: [],
}
},
mounted() {
@@ -196,6 +212,18 @@
console.log('>>>>>>>>>getAllWarehouse', resp)
this.warehouseList = resp.data
}).catch(() => {})
+
+ var params = {
+ type: "warehouse",
+ psid: '0'
+ }
+
+ typeValues(params).then(resp => {
+ console.log('>>>>>>>>>typeValues', resp)
+ this.warehouseTypeList = resp.data
+ }).catch(() => {})
+
+
},
getWarehouseAreaType() {
var parpams = {
@@ -315,6 +343,7 @@
warehouseName: '',
zoneSid: '',
zoneName: '',
+ warehouseTypeValue: "",
}
}
this.loadList()
@@ -388,6 +417,7 @@
resetState() {
this.viewState = 1
+ this.loadList()
},
enableChange(sid, state) {
console.log('sid', sid)
diff --git a/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue b/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue
index 886fecc8f0..35c2f253db 100644
--- a/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue
+++ b/yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue
@@ -19,6 +19,20 @@
+
+
+ * 仓库类型
+
+
+
+
+
+
+
+
+
* 选择所属仓库
@@ -42,16 +56,27 @@
+
+
+
+
+
+ * 库区类型
+
+
+
+
+
+
* 库区名称
-
+
-
-
-
库区编码
@@ -61,6 +86,10 @@
+
+
+
+
库区容量
@@ -77,21 +106,8 @@
-
-
- * 库区类型
-
-
-
-
-
-
-
-
备注
@@ -112,6 +128,9 @@
import req2 from '@/api/warehouse/warehouse.js'
import req3 from '@/api/warehouse/warehouseAreaType.js'
import req4 from '@/api/warehouse/warehouseZone.js'
+ import {
+ typeValues,
+ } from '@/api/Common/dictcommons.js'
export default {
components: {},
data() {
@@ -130,6 +149,8 @@
zoneSid: '',
areaTypeSid: "",
areaTypeName: "",
+ warehouseTypeKey: '',
+ warehouseTypeValue: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
@@ -138,8 +159,14 @@
},
warehouseList: [],
warehouseZoneList: [],
+ areaTypeList: [],
warehouseTypeList: [],
rules: {
+ warehouseTypeValue: [{
+ required: true,
+ message: '请选择仓库类型',
+ trigger: 'change'
+ }],
warehouseName: [{
required: true,
message: '请选择所属仓库',
@@ -164,20 +191,27 @@
}
}
},
- created() {
- this.initData()
- },
+ created() {},
methods: {
initData() {
+
+ var params = {
+ type: "warehouse",
+ psid: '0'
+ }
+
+ typeValues(params).then(resp => {
+ console.log('>>>>>>>>>typeValues', resp)
+ this.warehouseTypeList = resp.data
+ }).catch(() => {})
+
+
var parpams = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
}
- req2.getAllWarehouse(parpams).then(resp => {
- this.warehouseList = resp.data
- })
req3.getAllWarehouseareatype(parpams).then(resp => {
- this.warehouseTypeList = resp.data
+ this.areaTypeList = resp.data
})
},
@@ -185,43 +219,6 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
- // if (this.formobj.warehouseSid == '' || this.formobj.warehouseName == '') {
- // this.$message({
- // showClose: true,
- // type: 'warning',
- // message: "请选择所属仓库"
- // })
- // return
- // }
-
- // if (this.formobj.areaName == '') {
- // this.$message({
- // showClose: true,
- // type: 'warning',
- // message: "库区名称不能为空"
- // })
- // return
- // }
-
-
- // if (this.formobj.areaCode == '') {
- // this.$message({
- // showClose: true,
- // type: 'warning',
- // message: "库区编码不能为空"
- // })
- // return
- // }
-
-
- // if (this.formobj.areaTypeSid == '' || this.formobj.areaTypeName == '') {
- // this.$message({
- // showClose: true,
- // type: 'warning',
- // message: "请选择库区类型"
- // })
- // return
- // }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
@@ -234,7 +231,65 @@
type: 'success',
message: resp.msg
})
- this.handleReturn('true')
+ this.$confirm('是否继续添加仓库区域信息?', '温馨提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ // 点击确定进行的操作
+
+ var warehouseTypeKey = this.formobj.warehouseTypeKey
+ var warehouseTypeValue = this.formobj.warehouseTypeValue
+ var warehouseName = this.formobj.warehouseName
+ var warehouseSid = this.formobj.warehouseSid
+ var zoneName = this.formobj.zoneName
+ var zoneSid = this.formobj.zoneSid
+
+ this.formobj = {
+ sid: '',
+ areaName: '',
+ areaCode: '由系统自动生成',
+ volume: '',
+ unit: '',
+ remarks: '',
+ warehouseName: warehouseName,
+ warehouseSid: warehouseSid,
+ zoneName: zoneName,
+ zoneSid: zoneSid,
+ areaTypeSid: "",
+ areaTypeName: "",
+ warehouseTypeKey: warehouseTypeKey,
+ warehouseTypeValue: warehouseTypeValue,
+ useOrgSid: window.sessionStorage.getItem('departmentSid'),
+ orgPath: window.sessionStorage.getItem('defaultOrgPath'),
+ createOrgSid: window.sessionStorage.getItem('orgSid'),
+ userSid: window.sessionStorage.getItem('userSid'),
+
+ }
+ this.$nextTick(() => {
+ this.$refs['form_obj'].clearValidate()
+ })
+ }).catch(() => {
+ // 点击取消进行的操作
+
+ this.formobj = {
+ sid: '',
+ zoneName: '',
+ zoneCode: '由系统自动生成',
+ volume: '',
+ unit: '',
+ remarks: '',
+ warehouseName: '',
+ warehouseSid: '',
+ warehouseTypeKey: '',
+ warehouseTypeValue: '',
+ useOrgSid: window.sessionStorage.getItem('departmentSid'),
+ orgPath: window.sessionStorage.getItem('defaultOrgPath'),
+ createOrgSid: window.sessionStorage.getItem('orgSid'),
+ userSid: window.sessionStorage.getItem('userSid'),
+ }
+ this.$emit('doback')
+ });
} else {
// 根据resp.code进行异常情况处理
}
@@ -259,6 +314,8 @@
zoneSid: '',
areaTypeSid: "",
areaTypeName: "",
+ warehouseTypeKey: '',
+ warehouseTypeValue: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
@@ -268,12 +325,14 @@
this.$emit('doback')
},
showAdd() {
+ this.initData()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showEdit(row) {
+ this.initData()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
@@ -288,6 +347,36 @@
this.formobj = row
})
},
+
+ selectWarehouseTypeChange(val) {
+ const choose = this.warehouseTypeList.filter((item) => item.dictKey == val)
+ console.log('>>>>>>>>>selectWarehouseChange', choose)
+ this.formobj.warehouseTypeKey = choose[0].dictKey
+ this.formobj.warehouseTypeValue = choose[0].dictValue
+
+ this.formobj.warehouseSid = ''
+ this.formobj.warehouseName = ''
+
+ this.formobj.zoneSid = ''
+ this.formobj.zoneName = ''
+
+ this.getWarehouseList(this.formobj.warehouseTypeValue)
+
+ },
+
+ getWarehouseList(val) {
+
+ var parpams = {
+ useOrgSid: window.sessionStorage.getItem('departmentSid'),
+ warehouseTypeValue: val
+ }
+ req2.selectWarehouseByType(parpams).then(resp => {
+ this.warehouseList = resp.data
+ })
+
+
+ },
+
selectWarehouseChange(val) {
const choose = this.warehouseList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectWarehouseChange', choose)
@@ -316,7 +405,7 @@
},
selectWarehouseTypeValueChange(val) {
- const choose = this.warehouseTypeList.filter((item) => item.sid == val)
+ const choose = this.areaTypeList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectWarehouseTypeValueChange', choose)
this.formobj.areaTypeSid = choose[0].sid
this.formobj.areaTypeName = choose[0].warehouseAreaTypeName
diff --git a/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue
index 3f273cf21d..f5dc29b409 100644
--- a/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue
+++ b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZone.vue
@@ -22,6 +22,13 @@
+
+
+
+
+
+
@@ -58,6 +65,9 @@
+
+
+
@@ -84,6 +94,9 @@
import pageye from '@/components/pagination/pageye'
import divAdd from './warehouseZoneAdd.vue'
// import divInfo from './warehouseInfo.vue'
+ import {
+ typeValues,
+ } from '@/api/Common/dictcommons.js'
export default {
components: {
ButtonBar,
@@ -134,6 +147,7 @@
size: 10,
total: 0,
params: {
+ warehouseTypeValue: "",
name: '',
code: "",
address: ""
@@ -142,6 +156,7 @@
sids: [],
selectionList: [],
warehouseList: [],
+ warehouseTypeList: [],
}
},
mounted() {
@@ -173,6 +188,19 @@
console.log('>>>>>>>>>getAllWarehouse', resp)
this.warehouseList = resp.data
}).catch(() => {})
+
+
+ var params = {
+ type: "warehouse",
+ psid: '0'
+ }
+
+ typeValues(params).then(resp => {
+ console.log('>>>>>>>>>typeValues', resp)
+ this.warehouseTypeList = resp.data
+ }).catch(() => {})
+
+
},
// 搜索条件效果
clicksearchShow() {
@@ -240,7 +268,8 @@
params: {
name: '',
code: "",
- address: ""
+ address: "",
+ warehouseTypeValue: "",
}
}
this.loadList()
@@ -313,6 +342,7 @@
resetState() {
this.viewState = 1
+ this.loadList()
},
enableChange(sid, state) {
console.log('sid', sid)
diff --git a/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue
index 970f76e877..fc91c6eb9a 100644
--- a/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue
+++ b/yxt-as-ui/src/views/warehouse/warehouseZone/warehouseZoneAdd.vue
@@ -19,6 +19,20 @@
+
+
+ * 仓库类型
+
+
+
+
+
+
+
+
+
* 选择所属仓库
@@ -38,6 +52,10 @@
+
+
+
+
区域编码
@@ -47,9 +65,6 @@
-
-
-
区域面积
@@ -66,13 +81,16 @@
-
+
+
+
+
+
备注
-
@@ -83,6 +101,9 @@