|
@@ -25,17 +25,12 @@ npm install vue-amap --save// 仓库添加
|
|
<ws-form
|
|
<ws-form
|
|
class="position"
|
|
class="position"
|
|
ref="deptBudgetList"
|
|
ref="deptBudgetList"
|
|
- :rules="mainReportAdd"
|
|
|
|
|
|
+ :rules="rules"
|
|
:model="deptBudgetList"
|
|
:model="deptBudgetList"
|
|
- >
|
|
|
|
|
|
+ ><div class="small-title">基本信息</div>
|
|
<ws-info-table>
|
|
<ws-info-table>
|
|
<!--仓库名称-->
|
|
<!--仓库名称-->
|
|
- <ws-form-item
|
|
|
|
- label="仓库名称"
|
|
|
|
- span="1"
|
|
|
|
- prop="contractNo"
|
|
|
|
- class="readonly"
|
|
|
|
- >
|
|
|
|
|
|
+ <ws-form-item label="仓库名称" span="1" prop="warehouseName">
|
|
<ws-input
|
|
<ws-input
|
|
v-model="deptBudgetList.warehouseName"
|
|
v-model="deptBudgetList.warehouseName"
|
|
placeholder="请输入仓库名"
|
|
placeholder="请输入仓库名"
|
|
@@ -44,7 +39,12 @@ npm install vue-amap --save// 仓库添加
|
|
/>
|
|
/>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
<!--负责人-->
|
|
<!--负责人-->
|
|
- <ws-form-item label="负责人" span="1" prop="buyer" class="readonly">
|
|
|
|
|
|
+ <ws-form-item
|
|
|
|
+ label="负责人"
|
|
|
|
+ span="1"
|
|
|
|
+ prop="personCharge"
|
|
|
|
+ class="readonly"
|
|
|
|
+ >
|
|
<ws-input
|
|
<ws-input
|
|
v-model="deptBudgetList.personCharge"
|
|
v-model="deptBudgetList.personCharge"
|
|
placeholder="请输入负责人姓名"
|
|
placeholder="请输入负责人姓名"
|
|
@@ -54,7 +54,7 @@ npm install vue-amap --save// 仓库添加
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
|
|
|
|
<!--负责人电话-->
|
|
<!--负责人电话-->
|
|
- <ws-form-item label="负责人电话" span="1" prop="shippingType">
|
|
|
|
|
|
+ <ws-form-item label="负责人电话" span="1" prop="personPhone">
|
|
<ws-input
|
|
<ws-input
|
|
v-model="deptBudgetList.personPhone"
|
|
v-model="deptBudgetList.personPhone"
|
|
placeholder="请输入负责人手机号码"
|
|
placeholder="请输入负责人手机号码"
|
|
@@ -70,7 +70,7 @@ npm install vue-amap --save// 仓库添加
|
|
v-model="selectedOptions"
|
|
v-model="selectedOptions"
|
|
clearable
|
|
clearable
|
|
size="large"
|
|
size="large"
|
|
- placeholder="请选择交货地"
|
|
|
|
|
|
+ placeholder="请选择仓库所在地"
|
|
style="width: 200%"
|
|
style="width: 200%"
|
|
@change="handleChange"
|
|
@change="handleChange"
|
|
/>
|
|
/>
|
|
@@ -94,6 +94,7 @@ npm install vue-amap --save// 仓库添加
|
|
<!--总吨量(吨)-->
|
|
<!--总吨量(吨)-->
|
|
<ws-form-item label="总吨量(吨)" span="1" prop="settlementMethod">
|
|
<ws-form-item label="总吨量(吨)" span="1" prop="settlementMethod">
|
|
<ws-input
|
|
<ws-input
|
|
|
|
+ class="totalStorage"
|
|
:readonly="true"
|
|
:readonly="true"
|
|
v-model="totalStorage"
|
|
v-model="totalStorage"
|
|
maxlength="100"
|
|
maxlength="100"
|
|
@@ -131,7 +132,7 @@ npm install vue-amap --save// 仓库添加
|
|
<ws-input
|
|
<ws-input
|
|
v-model="item.remark"
|
|
v-model="item.remark"
|
|
placeholder="请输入交货地"
|
|
placeholder="请输入交货地"
|
|
- maxlength="100"
|
|
|
|
|
|
+ maxlength="20"
|
|
size="small"
|
|
size="small"
|
|
/>
|
|
/>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
@@ -155,6 +156,7 @@ npm install vue-amap --save// 仓库添加
|
|
</ws-info-table>
|
|
</ws-info-table>
|
|
</ws-form>
|
|
</ws-form>
|
|
<ws-form ref="deptBudgetList" :model="deptBudgetList">
|
|
<ws-form ref="deptBudgetList" :model="deptBudgetList">
|
|
|
|
+ <div class="small-title">上传仓库照片</div>
|
|
<ws-upload
|
|
<ws-upload
|
|
ref="upload"
|
|
ref="upload"
|
|
table-name="maintain_work_order"
|
|
table-name="maintain_work_order"
|
|
@@ -167,9 +169,11 @@ npm install vue-amap --save// 仓库添加
|
|
@onChange="onChange"
|
|
@onChange="onChange"
|
|
accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
|
|
accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
|
|
/>
|
|
/>
|
|
|
|
+ <div style="margin-bottom: 5px" class="small-title">仓库定位</div>
|
|
|
|
+ <map-drag @marker="marker" @selectedAddress="selectedAddress"></map-drag>
|
|
</ws-form>
|
|
</ws-form>
|
|
<!-- <ws-button @click="exportlist()"></ws-button> -->
|
|
<!-- <ws-button @click="exportlist()"></ws-button> -->
|
|
- <map-drag @marker="marker" @selectedAddress="selectedAddress"></map-drag>
|
|
|
|
|
|
+
|
|
<!-- 提交 -->
|
|
<!-- 提交 -->
|
|
<div style="text-align: right; padding: 10px" class="center">
|
|
<div style="text-align: right; padding: 10px" class="center">
|
|
<el-button
|
|
<el-button
|
|
@@ -245,7 +249,21 @@ export default {
|
|
listDate: { country: '中国', level: 'country', city: '' },
|
|
listDate: { country: '中国', level: 'country', city: '' },
|
|
citylist: [],
|
|
citylist: [],
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
compId: sessionStorage.getItem('ws-pf_compId'),
|
|
- mainReportAdd: {},
|
|
|
|
|
|
+ rules: {
|
|
|
|
+ warehouseName: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: '请输入仓库名称',
|
|
|
|
+ trigger: 'blur',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ min: 2,
|
|
|
|
+ max: 20,
|
|
|
|
+ message: '仓库名长度不符合要求,请输入2-20字符之内',
|
|
|
|
+ trigger: 'blur',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
appendixIdsAdd: '',
|
|
appendixIdsAdd: '',
|
|
size: 10,
|
|
size: 10,
|
|
value1: '',
|
|
value1: '',
|
|
@@ -321,30 +339,85 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
submit() {
|
|
submit() {
|
|
- console.log(this.freightspace)
|
|
|
|
-
|
|
|
|
- this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
|
- this.deptBudgetList.warehousePrivate =
|
|
|
|
- CodeToText[this.selectedOptions[0]]
|
|
|
|
- this.deptBudgetList.warehouseCity =
|
|
|
|
- CodeToText[this.selectedOptions[1]]
|
|
|
|
- this.deptBudgetList.warehouseArea =
|
|
|
|
- CodeToText[this.selectedOptions[2]]
|
|
|
|
- this.deptBudgetList.warehousePositionInfoList = this.freightspace
|
|
|
|
- this.deptBudgetList.totalStorage = this.totalStorage
|
|
|
|
- addList(this.deptBudgetList)
|
|
|
|
- .toPromise()
|
|
|
|
- .then((response) => {
|
|
|
|
- this.$message.success('添加成功')
|
|
|
|
- this.$router.push({ path: 'warehouseManagementList' })
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
|
+ if (!this.deptBudgetList.warehouseName) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '仓库名称不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.warehouseName.length < 2 ||
|
|
|
|
+ this.deptBudgetList.warehouseName.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '仓库名称长度不符合要求,请控制在2-20字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.personCharge.length < 2 ||
|
|
|
|
+ this.deptBudgetList.personCharge.length > 10
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '负责人长度不符合要求,请控制在2-10字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.personPhone.length > 11) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '手机号输入有误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.detailedAddress.length < 2 ||
|
|
|
|
+ this.deptBudgetList.detailedAddress.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '详细地址长度不符合要求,请控制在2-20字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$confirm(`确定提交仓库信息?`, {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
})
|
|
})
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$refs.deptBudgetList.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.deptBudgetList.compId = sessionStorage.getItem(
|
|
|
|
+ 'ws-pf_compId'
|
|
|
|
+ )
|
|
|
|
+ this.deptBudgetList.warehousePrivate =
|
|
|
|
+ CodeToText[this.selectedOptions[0]]
|
|
|
|
+ this.deptBudgetList.warehouseCity =
|
|
|
|
+ CodeToText[this.selectedOptions[1]]
|
|
|
|
+ this.deptBudgetList.warehouseArea =
|
|
|
|
+ CodeToText[this.selectedOptions[2]]
|
|
|
|
+ this.deptBudgetList.warehousePositionInfoList = this.freightspace
|
|
|
|
+ this.deptBudgetList.totalStorage = this.totalStorage
|
|
|
|
+ addList(this.deptBudgetList)
|
|
|
|
+ .toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message.success('添加成功')
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementList' })
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
resetForm(deptBudgetList) {
|
|
resetForm(deptBudgetList) {
|
|
this.$refs[deptBudgetList].resetFields()
|
|
this.$refs[deptBudgetList].resetFields()
|
|
@@ -469,6 +542,24 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+/deep/.totalStorage .el-input__inner {
|
|
|
|
+ color: #afb5cb;
|
|
|
|
+ background: #f5f7fa;
|
|
|
|
+}
|
|
|
|
+.small-title {
|
|
|
|
+ position: relative;
|
|
|
|
+ padding: 10px;
|
|
|
|
+}
|
|
|
|
+.small-title::before {
|
|
|
|
+ position: absolute;
|
|
|
|
+ content: '';
|
|
|
|
+ display: block;
|
|
|
|
+ background: #5473e8;
|
|
|
|
+ width: 4px;
|
|
|
|
+ height: 14px;
|
|
|
|
+ left: 0px;
|
|
|
|
+ top: 13px;
|
|
|
|
+}
|
|
.position {
|
|
.position {
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
@@ -490,8 +581,8 @@ export default {
|
|
padding: 0 15%;
|
|
padding: 0 15%;
|
|
}
|
|
}
|
|
/deep/.ws-info-table .el-form-item {
|
|
/deep/.ws-info-table .el-form-item {
|
|
- border-right: 1px solid #cdd2dc;
|
|
|
|
- border-bottom: 1px solid #cdd2dc;
|
|
|
|
|
|
+ border-right: 1px solid transparent;
|
|
|
|
+ border-bottom: 1px solid transparent;
|
|
}
|
|
}
|
|
.readonly {
|
|
.readonly {
|
|
position: relative;
|
|
position: relative;
|
|
@@ -517,6 +608,10 @@ export default {
|
|
position: absolute;
|
|
position: absolute;
|
|
left: 0;
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
+.ws-info-table {
|
|
|
|
+ border-left: 1px solid transparent;
|
|
|
|
+ border-top: 1px solid transparent;
|
|
|
|
+}
|
|
.el-button--primary {
|
|
.el-button--primary {
|
|
background-color: #5878e8;
|
|
background-color: #5878e8;
|
|
border-color: #5878e8;
|
|
border-color: #5878e8;
|
|
@@ -526,13 +621,13 @@ export default {
|
|
}
|
|
}
|
|
/deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
/deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
padding: 0 25px;
|
|
padding: 0 25px;
|
|
- border-left: 1px solid #cdd2dc;
|
|
|
|
- background: #fafbfc;
|
|
|
|
|
|
+ border-left: 1px solid transparent;
|
|
|
|
+ background: #fff;
|
|
}
|
|
}
|
|
/deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
/deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
- width: 140px;
|
|
|
|
|
|
+ width: 100px;
|
|
text-align: center;
|
|
text-align: center;
|
|
- background: #f0f2f6;
|
|
|
|
|
|
+ background: #fff;
|
|
// border: 1px solid #cdd2dc;
|
|
// border: 1px solid #cdd2dc;
|
|
}
|
|
}
|
|
.button-container {
|
|
.button-container {
|
|
@@ -693,9 +788,6 @@ export default {
|
|
overflow: scroll;
|
|
overflow: scroll;
|
|
height: 93vh;
|
|
height: 93vh;
|
|
}
|
|
}
|
|
-/deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
|
|
- width: 130px;
|
|
|
|
-}
|
|
|
|
.ws-info-table .el-form-item {
|
|
.ws-info-table .el-form-item {
|
|
width: 33.3333%;
|
|
width: 33.3333%;
|
|
}
|
|
}
|