磅单信息添加打回复磅
This commit is contained in:
parent
de50c86d59
commit
0b0eea4eae
|
@ -185,6 +185,15 @@ public class PoundBillController extends BaseController
|
||||||
return toAjax(poundBillService.removeByIds(Arrays.asList(ids)));
|
return toAjax(poundBillService.removeByIds(Arrays.asList(ids)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打回复磅
|
||||||
|
*/
|
||||||
|
@GetMapping("/returnPound/{ids}")
|
||||||
|
public AjaxResult returnPound(@PathVariable String[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(poundBillService.returnPound(ids[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据主榜单获取最新捆号
|
* 根据主榜单获取最新捆号
|
||||||
|
|
|
@ -75,4 +75,6 @@ public interface IPoundBillService extends IService<PoundBill>
|
||||||
public int deletePoundBillById(String id);
|
public int deletePoundBillById(String id);
|
||||||
|
|
||||||
public String getMaxBundleNoByMst(String mstId);
|
public String getMaxBundleNoByMst(String mstId);
|
||||||
|
|
||||||
|
public boolean returnPound(String id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.ruoyi.basedata.domain.Empwgtdata;
|
import com.ruoyi.basedata.domain.Empwgtdata;
|
||||||
import com.ruoyi.basedata.service.impl.EmpwgtdataServiceImpl;
|
import com.ruoyi.basedata.service.impl.EmpwgtdataServiceImpl;
|
||||||
import com.ruoyi.bill.domain.Poundappli;
|
import com.ruoyi.bill.domain.Poundappli;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
@ -462,4 +463,22 @@ public class PoundBillServiceImpl extends ServiceImpl<PoundBillMapper, PoundBill
|
||||||
public String getMaxBundleNoByMst(String mstId) {
|
public String getMaxBundleNoByMst(String mstId) {
|
||||||
return poundBillMapper.getMaxBundleNoByMst(mstId);
|
return poundBillMapper.getMaxBundleNoByMst(mstId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean returnPound(String id){
|
||||||
|
//接口
|
||||||
|
|
||||||
|
//接口通了之后走这个逻辑
|
||||||
|
PoundBill poundBill = selectPoundBillById(id);
|
||||||
|
poundBill.setAgngrossmqty(poundBill.getWghmqty());
|
||||||
|
poundBill.setAgntaremqty(poundBill.getEmpmqty());
|
||||||
|
poundBill.setAgnnetmqty(poundBill.getNetmqty());
|
||||||
|
|
||||||
|
poundBill.setAgnstatus("ing");
|
||||||
|
poundBill.setBillstate("1");
|
||||||
|
poundBill.setWghmqty(BigDecimal.ZERO);
|
||||||
|
poundBill.setEmpmqty(BigDecimal.ZERO);
|
||||||
|
poundBill.setNetmqty(BigDecimal.ZERO);
|
||||||
|
updateById(poundBill);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,3 +111,12 @@ export function delPoundbill(id) {
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 打回复磅
|
||||||
|
export function returnPound(id) {
|
||||||
|
return request({
|
||||||
|
url: '/measurement/poundbill/returnPound/'+id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -198,6 +198,14 @@
|
||||||
v-hasPermi="['measurement:poundbill:export']"
|
v-hasPermi="['measurement:poundbill:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
@click="handleReturnPound"
|
||||||
|
>打回复磅</el-button>
|
||||||
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
@ -616,7 +624,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPoundbill,getNumber, getPoundbill, delPoundbill, addPoundbill, updatePoundbill } from "@/api/measurement/bill/poundbill"
|
import { listPoundbill,getNumber, getPoundbill, delPoundbill, addPoundbill, updatePoundbill, returnPound } from "@/api/measurement/bill/poundbill"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Poundbill",
|
name: "Poundbill",
|
||||||
|
@ -627,6 +635,8 @@ export default {
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
|
// 选中数组
|
||||||
|
billstates: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
|
@ -806,6 +816,7 @@ export default {
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.billstates = selection.map(item => item.billstate)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
@ -864,6 +875,21 @@ export default {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `poundbill_${new Date().getTime()}.xlsx`)
|
}, `poundbill_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
/** 打回复磅按钮操作 */
|
||||||
|
handleReturnPound() {
|
||||||
|
let billstates = this.billstates;
|
||||||
|
let ids = this.ids;
|
||||||
|
if(ids.length!=1){
|
||||||
|
this.$modal.msgWarning("请选择一条数据!")
|
||||||
|
}else if(billstates[0] == "2"){
|
||||||
|
returnPound(ids).then(response => {
|
||||||
|
this.$modal.msgSuccess("打回成功")
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.$modal.msgWarning("只能打回已完成的状态!")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//点击选中。
|
//点击选中。
|
||||||
handleRowClick(row) {
|
handleRowClick(row) {
|
||||||
|
|
Loading…
Reference in New Issue