Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit b8d3e0c46b

@ -225,6 +225,14 @@ public class Jg_naturalController {
public ActionResult batchRemove(@PathVariable("ids") String ids) {
String[] idList = ids.split(",");
int i = 0;
for (String allId : idList) {
QueryWrapper<PoundlistEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PoundlistEntity::getVehicleId, allId);
List<PoundlistEntity> poundlistEntityList = poundlistService.list(queryWrapper);
if (poundlistEntityList.size() > 0) {
return ActionResult.fail("该业务员已被使用,无法删除");
}
}
for (String allId : idList) {
this.delete(allId);
i++;

@ -728,6 +728,19 @@ public class SaleorderitemController {
poundlistEntity.setSalesStatus("99");
}
poundlistService.updateBatchById(poundlistList);
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getById(allId);
if (StringUtils.isNotEmpty(saleorderitemEntity.getSourcePoId())){
JSONArray array = JSON.parseArray(saleorderitemEntity.getSourcePoId());
for (Object purchaseId : array) {
if (StringUtils.isNotEmpty(String.valueOf(purchaseId))) {
PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getInfo(String.valueOf(purchaseId));
if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)) {
purchaseorderitemEntity.setIsTransfer("0");
purchaseorderitemService.updateById(purchaseorderitemEntity);
}
}
}
}
this.delete(allId);
i++;
}
@ -1088,7 +1101,6 @@ public class SaleorderitemController {
public ActionResult delete(@PathVariable("id") String id){
SaleorderitemEntity entity= saleorderitemService.getInfo(id);
if(entity!=null){
saleorderitemService.delete(entity);
QueryWrapper<Salesorder_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Salesorder_item0Entity::getSalesOrderId,entity.getId());
queryWrapper.lambda().select(Salesorder_item0Entity::getPoundlistId);
@ -1098,6 +1110,19 @@ public class SaleorderitemController {
poundlistEntity.setSalesStatus("99");
}
poundlistService.updateBatchById(poundlistList);
if (StringUtils.isNotEmpty(entity.getSourcePoId())){
JSONArray array = JSON.parseArray(entity.getSourcePoId());
for (Object purchaseId : array) {
if (StringUtils.isNotEmpty(String.valueOf(purchaseId))) {
PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getInfo(String.valueOf(purchaseId));
if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)) {
purchaseorderitemEntity.setIsTransfer("0");
purchaseorderitemService.updateById(purchaseorderitemEntity);
}
}
}
}
saleorderitemService.delete(entity);
QueryWrapper<Salesorder_item0Entity> queryWrapperSalesorder_item0=new QueryWrapper<>();
queryWrapperSalesorder_item0.lambda().eq(Salesorder_item0Entity::getSalesOrderId,entity.getId());
salesorder_item0Service.remove(queryWrapperSalesorder_item0);

@ -236,6 +236,14 @@ public class VehicleController {
public ActionResult batchRemove(@PathVariable("ids") String ids){
String[] idList = ids.split(",");
int i =0;
for (String allId : idList) {
QueryWrapper<PoundlistEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PoundlistEntity::getVehicleId, allId);
List<PoundlistEntity> poundlistEntityList = poundlistService.list(queryWrapper);
if (poundlistEntityList.size() > 0) {
return ActionResult.fail("该车辆已被使用,无法删除");
}
}
for (String allId : idList){
this.delete(allId);
i++;

@ -173,6 +173,7 @@
<el-radio-button :label="50">50</el-radio-button>
<el-radio-button :label="100">100</el-radio-button>
<el-radio-button :label="500">500</el-radio-button>
<el-radio-button :label="1000">1000</el-radio-button>
</el-radio-group>
</el-form-item>
</template>

@ -61,6 +61,7 @@
<el-radio-button :label="50">50</el-radio-button>
<el-radio-button :label="100">100</el-radio-button>
<el-radio-button :label="500">500</el-radio-button>
<el-radio-button :label="1000">1000</el-radio-button>
</el-radio-group>
</el-form-item>
<el-divider />
@ -107,4 +108,4 @@ export default {
}
}
}
</script>
</script>

@ -50,6 +50,7 @@
<el-radio-button :label="50">50</el-radio-button>
<el-radio-button :label="100">100</el-radio-button>
<el-radio-button :label="500">500</el-radio-button>
<el-radio-button :label="1000">1000</el-radio-button>
</el-radio-group>
</el-form-item>
<el-divider />
@ -121,4 +122,4 @@ export default {
}
}
}
</script>
</script>

@ -28,7 +28,7 @@ export default {
pageSizes: {
type: Array,
default() {
return [20, 50, 100, 500]
return [20, 50, 100, 500, 1000]
}
},
layout: {
@ -91,4 +91,4 @@ export default {
.pagination-container.hidden {
display: none;
}
</style>
</style>

@ -608,7 +608,7 @@
if(!flag){
this.$message({
type: 'error',
message: '订单已经转销售',
message: '订单已经转销售',
duration: 2500
})
return
@ -639,11 +639,10 @@
for (let i = 0; i < res.data.length; i++) {
let _data = res.data[i]
list.push(_data)
list.purchaseOrderId = purchaseOrderIds
list.purchaseOrderId = JSON.stringify(list.purchaseOrderId)
list.isTransfer = '1'
}
debugger
list.purchaseOrderId = purchaseOrderIds
list.purchaseOrderId = JSON.stringify(list.purchaseOrderId)
list.isTransfer = '1'
if (list.length>0) {
this.formVisible6 = true
this.$nextTick(() => {

@ -708,8 +708,8 @@
})
if (!flag){
this.$message({
message: res.msg,
type: 'success',
message: '库区不能为空',
type: 'error',
duration: 2000
})
return

@ -642,14 +642,14 @@
if (item.reservoirareaName == null || item.reservoirareaName == ''){
flag = false;
}
if (item.poundlistEntity.salesStatus > 0){
if (item.poundlistEntity.salesStatus == '1' || item.poundlistEntity.salesStatus == '2' || item.poundlistEntity.salesStatus == '3'){
statusFlag = false;
}
})
if (!flag){
this.$message({
message: res.msg,
type: 'success',
message: '库区不能为空',
type: 'error',
duration: 2000
})
return

@ -556,6 +556,20 @@
})
},
request() {
var flag = true;
this.dataForm.receiptout_item0List.forEach((item,index) => {
if (item.reservoirareaName == null || item.reservoirareaName == ''){
flag = false;
}
})
if (!flag){
this.$message({
message: '库区不能为空',
type: 'error',
duration: 2000
})
return
}
this.submitDisabled = true;
var _data = this.dataList()
if (!this.dataForm.id) {

@ -596,45 +596,45 @@
this.submitDisabled = true;
var _data =this.dataList()
debugger
// if (!this.dataForm.id) {
// request({
// url: '/api/arinvoices/Arinvoices',
// method: 'post',
// data: _data
// }).then((res) => {
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// onClose: () => {
// this.submitDisabled = false;
// this.visible = false
// this.$emit('refresh', true)
// }
// })
// }).catch(() => {
// this.submitDisabled = false
// })
// }else{
// request({
// url: '/api/arinvoices/Arinvoices/'+this.dataForm.id,
// method: 'PUT',
// data: _data
// }).then((res) => {
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// onClose: () => {
// this.submitDisabled = false;
// this.visible = false
// this.$emit('refresh', true)
// }
// })
// }).catch(() => {
// this.submitDisabled = false
// })
// }
if (!this.dataForm.id) {
request({
url: '/api/arinvoices/Arinvoices',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
}else{
request({
url: '/api/arinvoices/Arinvoices/'+this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
}
},
addarinvoices_item1List(){
let item = {

@ -463,6 +463,20 @@
})
},
request() {
var flag = true;
this.dataForm.receiptout_item0List.forEach((item,index) => {
if (item.reservoirareaName == null || item.reservoirareaName == ''){
flag = false;
}
})
if (!flag){
this.$message({
message: '库区不能为空',
type: 'error',
duration: 2000
})
return
}
this.submitDisabled = true;
var _data = this.dataList()
if (!this.dataForm.id) {

Loading…
Cancel
Save