Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 11 months ago
parent
commit
7777cb932d
  1. 6
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationService.java
  2. 1
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleexamine/ScmVehicleExamineMapper.xml
  3. 50
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/invoiced/InvoicedService.java
  4. 288
      yxt-as-ui/src/views/goods/brands/brandsAdd.vue
  5. 304
      yxt-as-ui/src/views/goods/category/categoryAdd.vue
  6. 238
      yxt-as-ui/src/views/goods/factory/factoryAdd.vue
  7. 75
      yxt-as-ui/src/views/goods/goods/goodsAdd2.vue
  8. 11
      yxt-as-ui/src/views/goods/goods/index.vue
  9. 215
      yxt-as-ui/src/views/goods/unit/unitAdd.vue
  10. 290
      yxt-as-ui/src/views/warehouse/goodsShelves/goodsShelvesAdd.vue
  11. 310
      yxt-as-ui/src/views/warehouse/warehouseArea/warehouseAreaAdd.vue
  12. 180
      yxt-as-ui/src/views/warehouse/warehouseAreaType/warehouseAreaTypeAdd.vue
  13. 6
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoService.java
  14. 16
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtend.java
  15. 2
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpu.java
  16. 4
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuListVo.java
  17. 4
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.xml
  18. 47
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuService.java
  19. 6
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsType.java
  20. 2
      yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.xml
  21. 3
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseArea.java
  22. 72
      yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaService.java

6
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busbillapplication/BusBillApplicationService.java

@ -1703,8 +1703,10 @@ public class BusBillApplicationService extends MybatisBaseService<BusBillApplica
}
if(StringUtils.isNotBlank(fileUrl)){
BusBillApplication finBillApplication = fetchBySid(dto.getSid());
finBillApplication.setFileUrl(fileUrl);
baseMapper.updateById(finBillApplication);
if (finBillApplication != null){
finBillApplication.setFileUrl(fileUrl);
baseMapper.updateById(finBillApplication);
}
}
return fileUrl;
}

1
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleexamine/ScmVehicleExamineMapper.xml

@ -130,5 +130,6 @@
AND se.useOrgSid = #{orgPath}
AND se.inspectionResult = '2'
AND bv.vehicleState != '0004'
AND bv.useOrgSid = #{orgPath}
</select>
</mapper>

50
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/invoiced/InvoicedService.java

@ -350,8 +350,36 @@ public class InvoicedService {
BusBillApplicationDetailsVo data = busBillApplicationFeign.fetchDetailByCkSid(query.getSid()).getData();
BusDeliveredApply busDeliveredApply = busDeliveredApplyFeign.fetchBySid(query.getSid()).getData();
List<BusDeliveredApplyDetails> busDeliveredApplyDetails = busDeliveredApplyDetailsFeign.selectByApplySid(query.getSid()).getData();
if ("2".equals(busDeliveredApply.getPaymentMethodKey()) && StringUtils.isBlank(data.getSid())){
String userSid = query.getUserSid();
String orgPath = query.getOrgPath();
List<String> vins = query.getVins();
for (BusDeliveredApplyDetails busDeliveredApplyDetail : busDeliveredApplyDetails) {
vins.add(busDeliveredApplyDetail.getVinSid());
}
ResultBean<BillApplicationIInfoVoss> billApplicationIInfoVoResultBean = finBillApplicationFeign.selectByContractNo(busDeliveredApply.getContractNo(),vins);
if(billApplicationIInfoVoResultBean.getData() != null){
BillApplicationIInfoVoss billApplicationIInfoVoss = billApplicationIInfoVoResultBean.getData();
BeanUtil.copyProperties(billApplicationIInfoVoss,billApplicationIInfoVo);
}
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(orgPath).getData();
billApplicationIInfoVo.setCkSid(query.getSid());
billApplicationIInfoVo.setPublishInfo(sysOrganizationVo.getName() + "-" + sysUserVo.getName());
billApplicationIInfoVo.setShowBtn(true);
billApplicationIInfoVo.setInvoiceStateKey("001");
billApplicationIInfoVo.setInvoiceState("正常开票");
billApplicationIInfoVo.setDate(DateUtil.formatDate(new Date()));
billApplicationIInfoVo.setShowXsState(true);
return rb.success().setData(billApplicationIInfoVo);
}
billApplicationIInfoVo.setShowValueCustomer(data.getShowValueCustomer());
if (data != null) {
if ("2".equals(busDeliveredApply.getPaymentMethodKey())){
billApplicationIInfoVo.setNoEditInvoiceTypeAndName(true);
billApplicationIInfoVo.setNoEditInvoiceMoney(true);
}
billApplicationIInfoVo.setRemarks(data.getRemarks());
billApplicationIInfoVo.setModelSid(busDeliveredApply.getModelSid());
billApplicationIInfoVo.setModelName(busDeliveredApply.getModelName());
billApplicationIInfoVo.setSid(data.getSid());
@ -471,28 +499,6 @@ public class InvoicedService {
}
} else {
if ("2".equals(busDeliveredApply.getPaymentMethodKey())){
String userSid = query.getUserSid();
String orgPath = query.getOrgPath();
List<String> vins = query.getVins();
if(vins.size() == 0){
return rb.setMsg("请选择车辆");
}
ResultBean<BillApplicationIInfoVoss> billApplicationIInfoVoResultBean = finBillApplicationFeign.selectByContractNo(query.getContractId(),vins);
if(billApplicationIInfoVoResultBean.getData() != null){
BillApplicationIInfoVoss billApplicationIInfoVoss = billApplicationIInfoVoResultBean.getData();
BeanUtil.copyProperties(billApplicationIInfoVoss,billApplicationIInfoVo);
}
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(orgPath).getData();
billApplicationIInfoVo.setPublishInfo(sysOrganizationVo.getName() + "-" + sysUserVo.getName());
billApplicationIInfoVo.setShowBtn(true);
billApplicationIInfoVo.setInvoiceStateKey("001");
billApplicationIInfoVo.setInvoiceState("正常开票");
billApplicationIInfoVo.setDate(DateUtil.formatDate(new Date()));
billApplicationIInfoVo.setShowXsState(true);
return rb.success().setData(billApplicationIInfoVo);
}
billApplicationIInfoVo.setModelSid(busDeliveredApply.getModelSid());
billApplicationIInfoVo.setModelName(busDeliveredApply.getModelName());
billApplicationIInfoVo.setProcInsId(busDeliveredApply.getProcInstId());

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": "",

11
yxt-as-ui/src/views/goods/goods/index.vue

@ -27,19 +27,19 @@
<el-form-item label="商品类别">
<el-select v-model="queryParams.params.goodsTypeName" placeholder="请选择" class="addinputw addinputInfo"
@change="selectCateChange">
<el-option v-for="item in goodsTypeList" :key="item.sid" :label="item.name" :value="item.sid" />
<el-option v-for="item in goodsTypeList" :key="item.sid" :label="item.goodsTypeName" :value="item.sid" />
</el-select>
</el-form-item>
<el-form-item label="品牌">
<el-select v-model="queryParams.params.brandName" placeholder="请选择" class="addinputw addinputInfo"
@change="selectBrandChange">
<el-option v-for="item in brandList" :key="item.sid" :label="item.name" :value="item.sid" />
<el-option v-for="item in brandList" :key="item.sid" :label="item.brandName" :value="item.sid" />
</el-select>
</el-form-item>
<el-form-item label="厂家">
<el-select v-model="queryParams.params.manufacturerName" placeholder="请选择"
class="addinputw addinputInfo" @change="selectfacturerChange">
<el-option v-for="item in facturerList" :key="item.sid" :label="item.name" :value="item.sid" />
<el-option v-for="item in facturerList" :key="item.sid" :label="item.manufacturerName" :value="item.sid" />
</el-select>
</el-form-item>
@ -302,6 +302,11 @@
this.selectionList = val
const aa = []
val.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
loadList() {
this.tableLoading = true

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>

180
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>
@ -45,38 +69,54 @@
warehouseAreaTypeName: '',
remarks: '',
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,6 +125,7 @@
warehouseAreaTypeName: '',
remarks: '',
useOrgSid: window.sessionStorage.getItem('departmentSid'),
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
createOrgSid: window.sessionStorage.getItem('orgSid'),
userSid: window.sessionStorage.getItem('userSid'),
}
@ -105,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>

6
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basebrandinfo/BaseBrandInfoService.java

@ -74,13 +74,13 @@ public class BaseBrandInfoService extends MybatisBaseService<BaseBrandInfoMapper
orgSidPath = orgSidPath.substring(0, i4);
qw.like("s.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("b..createBySid", query.getUserSid());
qw.eq("b.createBySid", query.getUserSid());
} else {
PagerVo<BaseGoodsSpuListVo> p = new PagerVo<>();
PagerVo<BaseBrandInfoVo> p = new PagerVo<>();
return rb.success().setData(p);
}
} else {
PagerVo<BaseGoodsSpuListVo> p = new PagerVo<>();
PagerVo<BaseBrandInfoVo> p = new PagerVo<>();
return rb.success().setData(p);
}
if(StringUtils.isNotBlank(query.getName())){

16
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsskuextend/BaseGoodsSkuExtend.java

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.yxt.common.core.domain.BaseEntity;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author wangpengfei
* @date 2024/2/26 13:36
@ -20,13 +22,13 @@ public class BaseGoodsSkuExtend extends BaseEntity {
private String inventoryAlertUpperLimit;//库存警戒上线
@TableField(value = "InventoryAlertLowerLimit")
private String inventoryAlertLowerLimit;//库存警戒下线
private String costPrice;//成本价
private String tagPrice;//吊牌价
private String salesPrice;//销售单价
private String standardPurchasePrice;//标准进价
private String agencyPrice;//代理价
private String discount;//折扣
private String minimumSalesPrice;//最低零售价
private BigDecimal costPrice;//成本价
private BigDecimal tagPrice;//吊牌价
private BigDecimal salesPrice;//销售单价
private BigDecimal standardPurchasePrice;//标准进价
private BigDecimal agencyPrice;//代理价
private BigDecimal discount;//折扣
private BigDecimal minimumSalesPrice;//最低零售价
private String isLockingSalesPrice;//是否锁定销售价 1是2否
private String isLockingSalesPriceValue;//是否锁定销售价
private String isIntegralExchange;//是否可以积分兑换

2
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpu.java

@ -22,7 +22,7 @@ public class BaseGoodsSpu extends BaseEntity {
private String goodsUnitSid;//商品单位sid
private String goodsUnitName;//商品单位名称
private String taxRate;//税率
private String shelfLife;//保质期天
private Integer shelfLife;//保质期天
private String nationalStandardCode;//国标码
private String sortNo;//排序
private String externalCode;//外部编码

4
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuListVo.java

@ -25,10 +25,10 @@ public class BaseGoodsSpuListVo implements Vo {
private String shelfLife;//保质期
private String brandName;//品牌
private String manufacturerName;//厂家
private String isOriginalFactory;//原厂标志( 1 是 2否)
private String isOriginalFactoryValue;//原厂标志( 1 是 2否)
private String InventoryAlertUpperLimit;//库存上限
private String InventoryAlertLowerLimit;//库存下限
private String isLockingSalesPrice;//锁定销售价( 1 是 2否)
private String isLockingSalesPriceValue;//锁定销售价( 1 是 2否)
private String minimumSalesPrice;//销售底价
private String standardPurchasePrice;//三包价格
private String agencyPrice;//首保价格

4
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuMapper.xml

@ -81,8 +81,8 @@ WHERE
</select>
<select id="checkForUpdate" resultType="com.yxt.base.biz.base.basegoodsspu.BaseGoodsSpu">
select *
from base_goods_unit
where unitName = #{unitName}
from base_goods_spu
where goodsCode = #{goodsCode}
and useOrgSid = #{useOrgSid}
and isDelete = 0
and sid != #{sid}

47
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodsspu/BaseGoodsSpuService.java

@ -13,9 +13,11 @@ import com.yxt.base.biz.base.basegoodsskuextend.UrlsVo;
import com.yxt.base.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo;
import com.yxt.base.biz.base.basegoodsunit.BaseGoodsUnit;
import com.yxt.base.biz.base.basegoodsunit.BaseGoodsUnitService;
import com.yxt.base.feign.portal.privilege.PrivilegeQuery;
import com.yxt.base.feign.portal.sysorganization.SysOrganizationFeign;
import com.yxt.base.feign.portal.sysorganization.SysOrganizationVo;
import com.yxt.base.feign.portal.sysstafforg.SysStaffOrgFeign;
import com.yxt.base.feign.portal.sysuser.SysUserFeign;
import com.yxt.base.utils.PinYinUtils;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
@ -65,7 +67,8 @@ public class BaseGoodsSpuService extends MybatisBaseService<BaseGoodsSpuMapper,
private BaseBrandInfoService baseBrandInfoService;
@Autowired
private BaseManufacturerService baseManufacturerService;
@Autowired
private SysUserFeign sysUserFeign;
public ResultBean<PagerVo<BaseGoodsSpuVo>> listPage(PagerQuery<BaseGoodsSpuQuery> pq) {
ResultBean rb = ResultBean.fireFail();
BaseGoodsSpuQuery query = pq.getParams();
@ -190,18 +193,50 @@ public class BaseGoodsSpuService extends MybatisBaseService<BaseGoodsSpuMapper,
ResultBean rb = ResultBean.fireFail();
BaseGoodsSpuListQuery query = pq.getParams();
QueryWrapper<BaseGoodsSpu> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(query.getOrgPath())) {
String createOrgSid = sysStaffOrgFeign.getOrgSidByPath(query.getOrgPath()).getData();
qw.eq("p.createOrgSid", createOrgSid);
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setMenuUrl(query.getMenuUrl());
privilegeQuery.setUserSid(query.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("u.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("u.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("u.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("u.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("p.createBySid", query.getUserSid());
} else {
PagerVo<BaseGoodsSpuListVo> p = new PagerVo<>();
return rb.success().setData(p);
}
} else {
PagerVo<BaseGoodsSpuListVo> p = new PagerVo<>();
return rb.success().setData(p);
}
if (StringUtils.isNotBlank(query.getGoodsPY())) {
qw.like("p.goodsPY", query.getGoodsPY());
}
if (StringUtils.isNotBlank(query.getCreateOrgName())) {
qw.like("p.createOrgName", query.getCreateOrgName());
qw.like("c.`name`", query.getCreateOrgName());
}
if (StringUtils.isNotBlank(query.getUseOrgName())) {
qw.like("p.useOrgName", query.getUseOrgName());
qw.like("u.`name`", query.getUseOrgName());
}
if (StringUtils.isNotBlank(query.getGoodsName())) {
qw.like("p.goodsName", query.getGoodsName());

6
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basegoodstype/BaseGoodsType.java

@ -3,6 +3,8 @@ package com.yxt.base.biz.base.basegoodstype;
import com.yxt.common.core.domain.BaseEntity;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author wangpengfei
* @date 2024/2/26 13:36
@ -11,8 +13,8 @@ import lombok.Data;
public class BaseGoodsType extends BaseEntity {
private String goodsTypeName;//商品类别名称
private String goodsTypeCode;//类别编码
private String percentageRate;//提成比例
private Double percentageAmount;//提成金额
private Integer percentageRate;//提成比例
private BigDecimal percentageAmount;//提成金额
private String pSid;//父级sid
private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点
private String isGoodsID;//是否一品一码 0 否 1是

2
yxt-base-biz/src/main/java/com/yxt/base/biz/base/basemanufacturer/BaseManufacturerMapper.xml

@ -29,7 +29,7 @@
select *
from base_manufacturer
where manufacturerCode = #{manufacturerCode}
and useOrgSid = #{deptSid}
and useOrgSid = #{useOrgSid}
and isDelete = 0
and sid != #{sid}
</select>

3
yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseArea.java

@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.domain.BaseEntity;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.UUID;
@ -22,7 +23,7 @@ public class WmsWarehouseArea extends BaseEntity {
private String areaName;//库位名称
private String areaCode;//库位编码
private String warehouseSid;//仓库sid
private String volume;//库位容量
private BigDecimal volume;//库位容量
private String unit;//计量单位
private String areaTypeSid;//货区类型
}

72
yxt-wms-biz/src/main/java/com/yxt/wms/biz/base/wmswarehousearea/WmsWarehouseAreaService.java

@ -42,42 +42,42 @@ public class WmsWarehouseAreaService extends MybatisBaseService<WmsWarehouseArea
ResultBean rb = ResultBean.fireFail();
WmsWarehouseAreaQuery query = pq.getParams();
QueryWrapper<WmsWarehouseArea> qw = new QueryWrapper<>();
// PrivilegeQuery privilegeQuery = new PrivilegeQuery();
// privilegeQuery.setOrgPath(query.getOrgPath());
// privilegeQuery.setMenuUrl(query.getMenuUrl());
// privilegeQuery.setUserSid(query.getUserSid());
// ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
// if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
// //数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
// String orgSidPath = query.getOrgPath();
// orgSidPath = orgSidPath + "/";
// int i1 = orgSidPath.indexOf("/");
// int i2 = orgSidPath.indexOf("/", i1 + 1);
// int i3 = orgSidPath.indexOf("/", i2 + 1);
// int i4 = orgSidPath.indexOf("/", i3 + 1);
// String orgLevelKey = defaultIdReltBean.getData();
// if ("1".equals(orgLevelKey)) {
// orgSidPath = orgSidPath.substring(0, i1);
// qw.like("s.orgSidPath", orgSidPath);
// } else if ("2".equals(orgLevelKey)) {
// orgSidPath = orgSidPath.substring(0, i2);
// qw.like("s.orgSidPath", orgSidPath);
// } else if ("3".equals(orgLevelKey)) {
// orgSidPath = orgSidPath.substring(0, i3);
// qw.like("s.orgSidPath", orgSidPath);
// } else if ("4".equals(orgLevelKey)) {
// orgSidPath = orgSidPath.substring(0, i4);
// qw.like("s.orgSidPath", orgSidPath);
// } else if ("5".equals(orgLevelKey)) {
// qw.eq("a.createBySid", query.getUserSid());
// } else {
// PagerVo<WmsWarehouseAreaVo> p = new PagerVo<>();
// return rb.success().setData(p);
// }
// } else {
// PagerVo<WmsWarehouseAreaVo> p = new PagerVo<>();
// return rb.success().setData(p);
// }
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setMenuUrl(query.getMenuUrl());
privilegeQuery.setUserSid(query.getUserSid());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("s.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("s.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("s.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("s.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
qw.eq("a.createBySid", query.getUserSid());
} else {
PagerVo<WmsWarehouseAreaVo> p = new PagerVo<>();
return rb.success().setData(p);
}
} else {
PagerVo<WmsWarehouseAreaVo> p = new PagerVo<>();
return rb.success().setData(p);
}
if (StringUtils.isNotBlank(query.getName())) {
qw.like("a.areaName", query.getName());
}

Loading…
Cancel
Save