Browse Source

完善必填页面样式

master
guoxing 11 months ago
parent
commit
e7745f6fe0
  1. 288
      yxt-as-ui/src/views/goods/brands/brandsAdd.vue
  2. 304
      yxt-as-ui/src/views/goods/category/categoryAdd.vue
  3. 238
      yxt-as-ui/src/views/goods/factory/factoryAdd.vue
  4. 75
      yxt-as-ui/src/views/goods/goods/goodsAdd2.vue
  5. 215
      yxt-as-ui/src/views/goods/unit/unitAdd.vue
  6. 290
      yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue
  7. 310
      yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue
  8. 194
      yxt-as-ui/src/views/warehouse/warehouseAreaType/warehouseAreaTypeAdd.vue

288
yxt-as-ui/src/views/goods/brands/brandsAdd.vue

@ -15,6 +15,61 @@
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 品牌名称</div>
<el-form-item prop="brandName">
<el-input v-model="formobj.brandName" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 品牌代码</div>
<el-form-item prop="brandCode">
<el-input v-model="formobj.brandCode" placeholder="" class="addinputw addinputInf" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 首字母大写</div>
<el-form-item prop="letter">
<el-input v-model="formobj.letter" placeholder="" class="addinputw addinputInf" clearable
oninput="value=value.replace(/[^A-Z]/g,'');" @input="letter" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty"> 品牌备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">品牌Logo</div>
<el-form-item>
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="1" bucket="map"
:upload-data="{ type: '0001' }" :class="{ hide: hideUploadBtn }" @change="backData" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!--
<el-card class="box-card">
<div class="item">
<span class="item_text"><span class="must">*</span> 品牌名称</span>
@ -33,37 +88,14 @@
<span class="item_text">品牌备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item">
<span class="item_text">品牌故事</span>
<el-input v-model="formobj.brandStory" placeholder="" class="item_input" clearable />
</div> -->
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<span class="item_text2" >品牌Logo</span>
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px;" class="item_input2" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
</div>
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<span class="item_text2">专区大图</span>
<upload ref="uploadImg2" v-model="imgList2" style="margin-top: 20px;" class="item_input2" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn2 }" :upload-data="{ type: '0001' }" @change="backData2" />
</div>
</div> -->
<div class="item" style="margin-bottom: 100px;margin-top: 100px;">
<span class="item_text">品牌Logo</span>
<!-- <upload ref="uploadImg" v-model="imgList" style="" class="item_input" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
-->
<upload-img ref="uploadImg" class="item_input" v-model="imgList" :limit="1" bucket="map"
:upload-data="{ type: '0001' }" :class="{ hide: hideUploadBtn }" @change="backData" />
</div>
</el-card>
</el-card> -->
</div>
@ -96,7 +128,24 @@
},
hideUploadBtn: false,
hideUploadBtn2: false
hideUploadBtn2: false,
rules: {
brandName: [{
required: true,
message: '品牌名称不能为空',
trigger: 'blur'
}],
brandCode: [{
required: true,
message: '品牌代码不能为空',
trigger: 'blur'
}],
letter: [{
required: true,
message: '首字母大写不能为空',
trigger: 'blur'
}],
}
}
},
created() {
@ -122,48 +171,53 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.brandName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "品牌名称不能为空"
})
return
}
// if (this.formobj.brandName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.brandCode == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.letter == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveBrands(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
}
})
if (this.formobj.brandCode == '') {
this.$message({
showClose: true,
type: 'warning',
message: "品牌代码不能为空"
})
return
}
if (this.formobj.letter == '') {
this.$message({
showClose: true,
type: 'warning',
message: "首字母大写不能为空"
})
return
}
req.saveBrands(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -211,93 +265,37 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_text2 {
flex: 1;
font-size: 18px;
text-align: right;
}
.item_input2 {
flex: 1;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

304
yxt-as-ui/src/views/goods/category/categoryAdd.vue

@ -3,7 +3,7 @@
<div class="tab-header webtop">
<!-- 标题 -->
<div>类别信息</div>
<div>商品类别</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
@ -15,7 +15,92 @@
<div class="listconadd">
<el-card class="box-card">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">选择父级类别</div>
<el-form-item>
<el-select v-model="formobj.pname" placeholder="请选择父级类别" class="addinputw addinputInfo"
@change="selectGoodsTypeChange">
<el-option v-for="item in goodsTypeList" :key="item.sid" :label="item.goodsTypeName"
:value="item.sid" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 类别名称</div>
<el-form-item prop="goodsTypeName">
<el-input v-model="formobj.goodsTypeName" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 类别编码</div>
<el-form-item prop="goodsTypeCode">
<el-input v-model="formobj.goodsTypeCode" placeholder="" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">提成比例</div>
<el-form-item>
<el-input v-model="formobj.percentageRate" placeholder="" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">提成金额</div>
<el-form-item>
<el-input v-model="formobj.percentageAmount" placeholder="" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 出库规则</div>
<el-form-item prop="outStockRuleValue">
<el-select v-model="formobj.outStockRuleValue" placeholder="请选择出库规则" class="addinputw addinputInfo"
@change="selectOutStockRuleChange">
<el-option v-for="item in outStockRuleList" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">排序</div>
<el-form-item>
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-card class="box-card">
<div class="item">
<span class="item_text">选择父级类别</span>
<el-select v-model="formobj.pname" placeholder="请选择父级类别" class="item_input" @change="selectGoodsTypeChange">
@ -59,7 +144,7 @@
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
</el-card>
</el-card> -->
</div>
@ -96,6 +181,23 @@
},
goodsTypeList: [],
outStockRuleList: [],
rules: {
goodsTypeName: [{
required: true,
message: '类别名称不能为空',
trigger: 'blur'
}],
goodsTypeCode: [{
required: true,
message: '类别编码不能为空',
trigger: 'blur'
}],
outStockRuleValue: [{
required: true,
message: '请选择出库规则',
trigger: 'change'
}],
}
}
},
created() {
@ -126,57 +228,61 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.goodsTypeName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "类别名称不能为空"
})
return
}
if (this.formobj.goodsTypeCode == '') {
this.$message({
showClose: true,
type: 'warning',
message: "类别编码不能为空"
})
return
}
if (this.formobj.outStockRule == '' || this.formobj.outStockRuleValue == '') {
this.$message({
showClose: true,
type: 'warning',
message: "请选择出库规则"
})
return
}
if (this.formobj.sortNo == '') {
this.$message({
showClose: true,
type: 'warning',
message: "类别排序不能为空"
})
return
}
req.saveTypes(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
// if (this.formobj.goodsTypeName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.goodsTypeCode == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.outStockRule == '' || this.formobj.outStockRuleValue == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.sortNo == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveTypes(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
.catch(() => {})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -229,79 +335,37 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

238
yxt-as-ui/src/views/goods/factory/factoryAdd.vue

@ -15,7 +15,48 @@
<div class="listconadd">
<el-card class="box-card">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 厂家名称</div>
<el-form-item prop="manufacturerName">
<el-input v-model="formobj.manufacturerName" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty"><span class="must">*</span> 厂家编码</div>
<el-form-item prop="manufacturerCode">
<el-input v-model="formobj.manufacturerCode" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 排序</div>
<el-form-item prop="sortNo">
<el-input v-model="formobj.sortNo" placeholder="" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item >
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-card class="box-card">
<div class="item">
<span class="item_text"><span class="must">*</span> 厂家名称</span>
<el-input v-model="formobj.manufacturerName" placeholder="" class="item_input" clearable />
@ -33,7 +74,7 @@
<span class="item_text">厂家备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
</el-card>
</el-card> -->
</div>
@ -58,6 +99,23 @@
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
},
rules: {
manufacturerName: [{
required: true,
message: '厂家名称不能为空',
trigger: 'blur'
}],
manufacturerCode: [{
required: true,
message: '厂家编码不能为空',
trigger: 'blur'
}],
sortNo: [{
required: true,
message: '排序不能为空',
trigger: 'blur'
}],
}
}
},
created() {},
@ -66,47 +124,53 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.manufacturerName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "厂家名称不能为空"
})
return
}
// if (this.formobj.manufacturerName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.manufacturerCode == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.sortNo == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveFacturer(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
}
})
if (this.formobj.manufacturerCode == '') {
this.$message({
showClose: true,
type: 'warning',
message: "厂家编码不能为空"
})
return
}
if (this.formobj.sortNo == '') {
this.$message({
showClose: true,
type: 'warning',
message: "厂家排序不能为空"
})
return
}
req.saveFacturer(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -139,79 +203,37 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

75
yxt-as-ui/src/views/goods/goods/goodsAdd2.vue

@ -36,14 +36,14 @@
</el-col>
<el-col :span="6">
<div class="span-sty">商品条形码</div>
<div class="span-sty">条形码</div>
<el-form-item>
<el-input v-model="formobj.barCode" placeholder="由系统自动生成" :readonly="true" class="addinputw addinputInfo"
clearable />
</el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">商品拼音缩写</div>
<div class="span-sty"> 拼音缩写</div>
<el-form-item>
<el-input v-model="formobj.goodsPY" placeholder="由系统自动生成" :readonly="true" class="addinputw addinputInfo"
clearable />
@ -95,19 +95,18 @@
<el-row>
<el-col :span="6">
<div class="span-sty"><span class="must">*</span> 商品品牌</div>
<div class="span-sty"><span class="must">*</span> 品牌</div>
<el-form-item prop="brandName">
<el-select v-model="formobj.brandName" placeholder="请选择商品品牌" class="addinputw"
@change="selectBrandChange">
<el-select v-model="formobj.brandName" placeholder="请选择品牌" class="addinputw" @change="selectBrandChange">
<el-option v-for="item in brandList" :key="item.sid" :label="item.brandName" :value="item.sid" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<div class="span-sty"><span class="must">*</span> 商品厂家</div>
<div class="span-sty"><span class="must">*</span> 厂家</div>
<el-form-item prop="manufacturerName">
<el-select v-model="formobj.manufacturerName" placeholder="请选择商品厂家" class="addinputw"
<el-select v-model="formobj.manufacturerName" placeholder="请选择厂家" class="addinputw"
@change="selectfacturerChange">
<el-option v-for="item in facturerList" :key="item.sid" :label="item.manufacturerName"
:value="item.sid" />
@ -118,7 +117,8 @@
<el-col :span="6">
<div class="span-sty">原厂标志</div>
<el-form-item>
<el-radio-group v-model="formobj.isOriginalFactory" size="small" class="addinputw">
<el-radio-group v-model="formobj.isOriginalFactory" size="small" class="addinputw"
@change="selectIsOriginalFactory">
<el-radio :label="'1'"></el-radio>
<el-radio :label="'2'"></el-radio>
</el-radio-group>
@ -130,17 +130,18 @@
<el-row>
<el-col :span="6">
<div class="span-sty"><span class="must">*</span> 商品排序</div>
<el-form-item prop="sortNo">
<el-input v-model="formobj.sortNo" placeholder="商品排序" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
<div class="span-sty"><span class="must">*</span> 库存上限</div>
<el-form-item prop="inventoryAlertUpperLimit">
<el-input v-model="formobj.inventoryAlertUpperLimit" placeholder="库存上限" class="addinputw addinputInfo"
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</el-form-item>
</el-col>
<el-col :span="18">
<div class="span-sty">商品备注</div>
<el-form-item>
<el-input v-model="formobj.skuRemarks" placeholder="商品备注" class="addinputw addinputInfo" clearable />
<div class="span-sty"><span class="must">*</span> 库存下限</div>
<el-form-item prop="inventoryAlertLowerLimit">
<el-input v-model="formobj.inventoryAlertLowerLimit" placeholder="库存下限" class="addinputw addinputInfo"
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</el-form-item>
</el-col>
@ -148,22 +149,20 @@
<el-row>
<el-col :span="16">
<div class="span-sty"><span class="must">*</span> 库存上限</div>
<el-form-item prop="inventoryAlertUpperLimit">
<el-input v-model="formobj.inventoryAlertUpperLimit" placeholder="库存上限" class="addinputw addinputInfo"
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
<el-col :span="6">
<div class="span-sty"><span class="must">*</span> 排序</div>
<el-form-item prop="sortNo">
<el-input v-model="formobj.sortNo" placeholder="排序" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</el-form-item>
</el-col>
<el-col :span="18">
<div class="span-sty"><span class="must">*</span> 库存下限</div>
<el-form-item prop="inventoryAlertLowerLimit">
<el-input v-model="formobj.inventoryAlertLowerLimit" placeholder="库存下限" class="addinputw addinputInfo"
clearable oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
<div class="span-sty">备注</div>
<el-form-item>
<el-input v-model="formobj.skuRemarks" placeholder="备注" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
@ -171,7 +170,8 @@
<el-col :span="6">
<div class="span-sty">锁定销售定价</div>
<el-form-item>
<el-radio-group v-model="formobj.isLockingSalesPrice" size="small" class="addinputw">
<el-radio-group v-model="formobj.isLockingSalesPrice" size="small" class="addinputw"
@change="selectIsLockingSalesPrice">
<el-radio :label="'1'"></el-radio>
<el-radio :label="'2'"></el-radio>
</el-radio-group>
@ -208,7 +208,7 @@
<el-row>
<el-col :span="24">
<div class="span-sty">规格图片</div>
<div class="span-sty">商品图片</div>
<el-form-item>
<upload-img ref="uploadImg" class="addinputw addinputInfo" v-model="imgList" :limit="50" bucket="map"
:upload-data="{ type: '0001' }" @change="backData" />
@ -259,13 +259,13 @@
"brandName": "",
"manufacturerSid": "",
"manufacturerName": "",
"isOriginalFactory": "",
"isOriginalFactory": "2",
"isOriginalFactoryValue": "",
"sortNo": "",
"skuRemarks": "",
"inventoryAlertUpperLimit": "",
"inventoryAlertLowerLimit": "",
"isLockingSalesPrice": "",
"isLockingSalesPrice": "2",
"isLockingSalesPriceValue": "",
"minimumSalesPrice": "",
"standardPurchasePrice": "",
@ -329,6 +329,19 @@
this.initData()
},
methods: {
selectIsOriginalFactory(val) {
console.log('selectIsOriginalFactory》》》》', val)
this.formobj.isOriginalFactoryValue = val == '1' ? '是' : '否'
},
selectIsLockingSalesPrice(val) {
console.log('selectIsLockingSalesPrice》》》》', val)
this.formobj.isLockingSalesPriceValue = val == '1' ? '是' : '否'
},
initData() {
var parpams = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
@ -397,13 +410,13 @@
"brandName": "",
"manufacturerSid": "",
"manufacturerName": "",
"isOriginalFactory": "",
"isOriginalFactory": "2",
"isOriginalFactoryValue": "",
"sortNo": "",
"skuRemarks": "",
"inventoryAlertUpperLimit": "",
"inventoryAlertLowerLimit": "",
"isLockingSalesPrice": "",
"isLockingSalesPrice": "2",
"isLockingSalesPriceValue": "",
"minimumSalesPrice": "",
"standardPurchasePrice": "",

215
yxt-as-ui/src/views/goods/unit/unitAdd.vue

@ -15,7 +15,27 @@
<div class="listconadd">
<el-card class="box-card">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 计量单位名称</div>
<el-form-item prop="unitName">
<el-input v-model="formobj.unitName" placeholder="" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty">备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-card class="box-card">
<div class="item">
<span class="item_text"><span class="must">*</span> 计量单位名称</span>
<el-input v-model="formobj.unitName" placeholder="" class="item_input" clearable />
@ -24,33 +44,7 @@
<span class="item_text">计量单位备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item">
<span class="item_text">品牌故事</span>
<el-input v-model="formobj.brandStory" placeholder="" class="item_input" clearable />
</div> -->
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<span class="item_text2" >品牌Logo</span>
<upload ref="uploadImg2" v-model="imgList" style="margin-top: 20px;" class="item_input2" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
</div>
<div style="flex: 1;display: flex;flex-direction: row;align-items: center;">
<span class="item_text2">专区大图</span>
<upload ref="uploadImg2" v-model="imgList2" style="margin-top: 20px;" class="item_input2" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn2 }" :upload-data="{ type: '0001' }" @change="backData2" />
</div>
</div> -->
<!-- <div class="item" style="margin-bottom: 100px;margin-top: 100px;">
<span class="item_text">品牌Logo</span>
<upload ref="uploadImg" v-model="imgList" style="" class="item_input" :limit="1"
bucket="map" :class="{ hide: hideUploadBtn }" :upload-data="{ type: '0001' }" @change="backData" />
</div> -->
</el-card>
</el-card> -->
</div>
@ -60,8 +54,7 @@
<script>
import req from '@/api/goods/unit.js'
export default {
components: {
},
components: {},
data() {
return {
submitdisabled: false,
@ -74,6 +67,13 @@
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
},
rules: {
unitName: [{
required: true,
message: '计量单位名称不能为空',
trigger: 'blur'
}],
}
}
},
created() {
@ -84,30 +84,34 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.unitName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "计量单位名称不能为空"
})
return
}
// if (this.formobj.unitName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveUnits(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
}
})
req.saveUnits(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -122,8 +126,7 @@
}
this.$emit('doback')
},
showAdd() {
},
showAdd() {},
showEdit(row) {
req.initUnits(row.sid)
.then(resp => {
@ -139,91 +142,37 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_text2 {
flex: 1;
font-size: 18px;
text-align: right;
}
.item_input2 {
flex: 1;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

290
yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue

@ -15,7 +15,65 @@
<div class="listconadd">
<el-card class="box-card">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 选择所属仓库</div>
<el-form-item prop="warehouseName">
<el-select v-model="formobj.warehouseName" placeholder="请选择所属仓库" class="addinputw addinputInfo"
@change="selectWarehouseChange">
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName"
:value="item.sid" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty"><span class="must">*</span> 选择所属库区</div>
<el-form-item prop="locationName">
<el-select v-model="formobj.locationName" placeholder="请选择所属库区" class="addinputw addinputInfo"
@change="selectWarehouseAreaChange">
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" :value="item.sid" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 库位名称</div>
<el-form-item prop="rackName">
<el-input v-model="formobj.rackName" placeholder="库位名称" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="16">
<div class="span-sty"><span class="must">*</span> 库位编码</div>
<el-form-item prop="rackCode">
<el-input v-model="formobj.rackCode" placeholder="库位编码" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="备注" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-card class="box-card">
<div class="item">
<span class="item_text"><span class="must">*</span> 选择所属仓库</span>
<el-select v-model="formobj.warehouseName" placeholder="请选择所属仓库" class="item_input"
@ -44,7 +102,7 @@
<el-input v-model="formobj.remarks" placeholder="库位备注" class="item_input" clearable />
</div>
</el-card>
</el-card> -->
</div>
@ -76,6 +134,28 @@
},
warehouseList: [],
warehouseAreaList: [],
rules: {
warehouseName: [{
required: true,
message: '请选择所属仓库',
trigger: 'change'
}],
locationName: [{
required: true,
message: '请选择所属库区',
trigger: 'change'
}],
rackName: [{
required: true,
message: '库位名称不能为空',
trigger: 'blur'
}],
rackCode: [{
required: true,
message: '库位编码不能为空',
trigger: 'blur'
}]
}
}
},
created() {
@ -86,7 +166,7 @@
initData() {
var parpams = {
orgPath:window.sessionStorage.getItem('defaultOrgPath'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
}
req2.getAllWarehouse(parpams).then(resp => {
@ -123,61 +203,64 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.warehouseSid == '' || this.formobj.warehouseName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "请选择所属仓库"
})
return
}
if (this.formobj.locationSid == '' || this.formobj.locationSid == '') {
this.$message({
showClose: true,
type: 'warning',
message: "请选择所属库区"
})
return
}
if (this.formobj.rackName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "库位名称不能为空"
})
return
}
if (this.formobj.rackCode == '') {
this.$message({
showClose: true,
type: 'warning',
message: "库位编码不能为空"
})
return
}
req.saveGoodsShelves(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
// if (this.formobj.warehouseSid == '' || this.formobj.warehouseName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.locationSid == '' || this.formobj.locationSid == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.rackName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
// if (this.formobj.rackCode == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveGoodsShelves(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
.catch(() => {})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -213,79 +296,38 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
align-items: center;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

310
yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue

@ -15,7 +15,85 @@
<div class="listconadd">
<el-card class="box-card">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 选择所属仓库</div>
<el-form-item prop="warehouseName">
<el-select v-model="formobj.warehouseName" placeholder="请选择所属仓库" class="addinputw addinputInfo"
@change="selectWarehouseChange">
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName"
:value="item.sid" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 库区名称</div>
<el-form-item prop="areaName">
<el-input v-model="formobj.areaName" placeholder="库区名称" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 库区编码</div>
<el-form-item prop="areaCode">
<el-input v-model="formobj.areaCode" placeholder="库区编码" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" />
</el-form-item>
</el-col>
</el-row>
<el-row >
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 库区容量</div>
<el-form-item>
<el-input v-model="formobj.volume" placeholder="库区容量" class="addinputw addinputInfo" clearable
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 计量单位</div>
<el-form-item>
<el-input v-model="formobj.unit" placeholder="计量单位" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 库区类型</div>
<el-form-item prop="areaTypeName">
<el-select v-model="formobj.areaTypeName" placeholder="请选择库区类型" class="addinputw addinputInfo"
@change="selectWarehouseTypeValueChange">
<el-option v-for="item in warehouseTypeList" :key="item.sid" :label="item.warehouseAreaTypeName"
:value="item.sid" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="备注" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-card class="box-card">
<div class="item">
<span class="item_text"><span class="must">*</span> 选择所属仓库</span>
<el-select v-model="formobj.warehouseName" placeholder="请选择所属仓库" class="item_input"
@ -54,7 +132,7 @@
<el-input v-model="formobj.remarks" placeholder="库区备注" class="item_input" clearable />
</div>
</el-card>
</el-card> -->
</div>
@ -89,6 +167,29 @@
},
warehouseList: [],
warehouseTypeList: [],
rules: {
warehouseName: [{
required: true,
message: '请选择所属仓库',
trigger: 'change'
}],
areaName: [{
required: true,
message: '库区名称不能为空',
trigger: 'blur'
}],
areaCode: [{
required: true,
message: '库区编码不能为空',
trigger: 'blur'
}],
areaTypeName: [{
required: true,
message: '请选择库区类型',
trigger: 'change'
}],
}
}
},
created() {
@ -97,7 +198,7 @@
methods: {
initData() {
var parpams = {
orgPath:window.sessionStorage.getItem('defaultOrgPath'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
}
req2.getAllWarehouse(parpams).then(resp => {
this.warehouseList = resp.data
@ -112,59 +213,64 @@
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
}
req.saveWarehousearea(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
// 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) {
req.saveWarehousearea(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
.catch(() => {})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -212,80 +318,38 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
align-items: center;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
align-items: center;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

194
yxt-as-ui/src/views/warehouse/warehouseAreaType/warehouseAreaTypeAdd.vue

@ -15,7 +15,31 @@
<div class="listconadd">
<el-card class="box-card">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row class="first_row">
<el-col :span="24">
<div class="span-sty"><span class="must">*</span> 库区类型名称</div>
<el-form-item prop="warehouseAreaTypeName">
<el-input v-model="formobj.warehouseAreaTypeName" placeholder="库区类型名称" class="addinputw addinputInfo"
clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty"> 库区类型备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="库区类型备注" class="addinputw addinputInfo" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-card class="box-card">
<div class="item">
<span class="item_text"><span class="must">*</span> 库区类型名称</span>
@ -26,7 +50,7 @@
<el-input v-model="formobj.remarks" placeholder="库区类型备注" class="item_input" clearable />
</div>
</el-card>
</el-card> -->
</div>
@ -44,40 +68,55 @@
sid: '',
warehouseAreaTypeName: '',
remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
},
rules: {
warehouseAreaTypeName: [{
required: true,
message: '库区类型名称不能为空',
trigger: 'blur'
}],
},
}
},
created() {},
methods: {
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.warehouseAreaTypeName == '') {
this.$message({
showClose: true,
type: 'warning',
message: "库区类型名称不能为空"
})
return
}
req.saveWarehousearea(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
// if (this.formobj.warehouseAreaTypeName == '') {
// this.$message({
// showClose: true,
// type: 'warning',
// message: ""
// })
// return
// }
this.$refs['form_obj'].validate((valid) => {
if (valid) {
req.saveWarehousearea(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
.catch(() => {})
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -85,10 +124,10 @@
sid: '',
warehouseAreaTypeName: '',
remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
}
this.$emit('doback')
},
@ -107,79 +146,38 @@
}
}
</script>
<style lang="scss" scoped>
//
::v-deep .hide {
.el-upload--picture-card {
display: none !important;
}
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
.must {
color: #f00;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.must {
color: #f00;
}
.item_right {
flex: 1;
justify-items: center;
.span-sty {
width: 130px !important;
align-items: center;
}
.item_right_list_text {
font-size: 16px;
}
.addinputInfo {
margin-left: 120px !important;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

Loading…
Cancel
Save