diff --git a/src/api/shipment/box.js b/src/api/shipment/box.js
new file mode 100644
index 0000000..77a0976
--- /dev/null
+++ b/src/api/shipment/box.js
@@ -0,0 +1,9 @@
+import {createAPI} from '../../utils/httpRequest'
+
+export const getShipmentBoxList = (data)=>createAPI('/shipment/box/list','post',data)
+
+export const addShipmentBox = (data)=>createAPI('/shipment/box/add','post',data)
+
+export const removeShipmentBox = (data)=>createAPI('/shipment/box/remove','post',data)
+export const updateShipmentBox = (data)=>createAPI('/shipment/box/update','post',data)
+export const updateShipmentBoxStatus = (data)=>createAPI('/shipment/box/update/status','post',data)
diff --git a/src/api/shipment/roll.js b/src/api/shipment/roll.js
new file mode 100644
index 0000000..947cc6a
--- /dev/null
+++ b/src/api/shipment/roll.js
@@ -0,0 +1,6 @@
+import {createAPI} from '../../utils/httpRequest'
+
+export const getShipmentRollDataList = (data) => createAPI(`/shipment/roll/list`,'post',data)
+export const saveShipmentRollData = (data) => createAPI(`/shipment/roll/add`,'post',data)
+export const removeShipmentRollData = (data) => createAPI(`/shipment/roll/remove`,'post',data)
+export const getShipmentRollAllData = (data) => createAPI(`/shipment/roll/all`,'post',data)
diff --git a/src/views/modules/finshProduct/outWarehouse.vue b/src/views/modules/finshProduct/outWarehouse.vue
index f6bfa93..5a01a6d 100644
--- a/src/views/modules/finshProduct/outWarehouse.vue
+++ b/src/views/modules/finshProduct/outWarehouse.vue
@@ -3,6 +3,7 @@ import OutWarehouseDetail from './outWarehouse/outWarehouseDetail.vue'
import {getShipmentPage} from '../../../api/shipment'
import {getShipmentDetailList} from '../../../api/shipment/detail'
import ShipmentBox from './outWarehouse/shipmentBox.vue'
+import {addShipmentBox, getShipmentBoxList} from '../../../api/shipment/box'
export default {
name: "outWarehouse",
@@ -102,6 +103,7 @@ export default {
row:{},
activeName:'detail',
detailDataList:[],
+ detailLoading: false,
columnDetailList:[
{
userId: this.$store.state.user.name,
@@ -206,7 +208,9 @@ export default {
fixed: '',
columnWidth: 80
}
- ]
+ ],
+
+ boxDataList:[],
}
},
methods:{
@@ -248,7 +252,8 @@ export default {
},
handleOutWarehouse(row){
this.form = {...row}
- this.open=true;
+ this.open = true;
+ this.getBoxDataList();
},
getDetailDataList(){
let params = {
@@ -256,13 +261,16 @@ export default {
site:this.row.site
}
this.detailDataList = [];
+ this.detailLoading = true;
getShipmentDetailList(params).then(({data})=>{
+ this.detailLoading = false;
if (data && data.code === 0){
this.detailDataList = data.rows;
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
+ this.detailLoading = false;
this.$message.error(error)
})
},
@@ -275,6 +283,39 @@ export default {
},
handleRowClick(row){
this.row = {...row};
+ },
+ getBoxDataList(){
+ let params = {
+ shipmentId: this.form.shipmentId,
+ site:this.form.site
+ }
+ this.boxDataList = [];
+ getShipmentBoxList(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.boxDataList = data.rows;
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
+ handleAddBox(){
+ let params = {
+ shipmentId: this.form.shipmentId,
+ site:this.form.site,
+ createBy:this.$store.state.user.name,
+ }
+ addShipmentBox(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.$message.success(data.msg)
+ this.getBoxDataList();
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
}
},
watch:{
@@ -375,11 +416,14 @@ export default {
-
+
-
+
@@ -399,7 +443,10 @@ export default {
-
+
diff --git a/src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue b/src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue
index ebebc30..d7a47bf 100644
--- a/src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue
+++ b/src/views/modules/finshProduct/outWarehouse/outWarehouseDetail.vue
@@ -14,6 +14,10 @@ export default {
type:Array,
default:()=>[]
},
+ loading:{
+ type:Boolean,
+ default:false
+ }
},
data(){
return{
@@ -28,7 +32,7 @@ export default {
-
+
+import {removeShipmentBox, updateShipmentBox, updateShipmentBoxStatus} from '../../../../api/shipment/box'
+import {
+ getShipmentRollAllData,
+ getShipmentRollDataList,
+ removeShipmentRollData,
+ saveShipmentRollData
+} from '../../../../api/shipment/roll'
+
export default {
name: 'shipmentBox',
props:{
@@ -12,8 +20,150 @@ export default {
},
},
data(){
-
+ return {
+ open:false,
+ endOpen:false,
+ form:{},
+ endForm:{},
+ rollDataList:[],
+ endDataList:[],
+ }
},
+ methods:{
+ handleAddBox(){
+ this.$emit('add','')
+ },
+ handleScanRoll(row){
+ this.form = {...row}
+ this.$nextTick(()=>{
+ this.$refs.inputRollNo.focus()
+ })
+ this.getDataList();
+ this.open = true;
+ },
+ getDataList(){
+ let params = {
+ ...this.form
+ }
+ getShipmentRollDataList(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.rollDataList = data.rows
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
+ handleUpdateBoxStatus(row){
+ let params = {
+ ...row
+ }
+ updateShipmentBoxStatus(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.$message.success(data.msg)
+ this.$emit('refresh')
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ },
+ handleRemoveBox(row){
+ this.$confirm('确定要删除这条数据?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(()=>{
+ removeShipmentBox(row).then(({data})=>{
+ if (data && data.code === 0){
+ this.$emit('refresh')
+ this.$message.success(data.msg)
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ })
+ },
+ handleRollScan(e){
+ let val = e.target.value.trim();
+ if (!val){
+ this.$message.warning('请输入条码')
+ this.form.rollNo = ''
+ return
+ }
+ let scanRow = val.split(';')
+ let params = {
+ ...this.form,
+ id:null,
+ rollNo:scanRow[0],
+ site:this.form.site,
+ createBy:this.$store.state.user.name,
+ }
+ saveShipmentRollData(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.$message.success(data.msg)
+ // 查询 roll
+ this.getDataList();
+ }else {
+ this.$message.warning(data.msg)
+ }
+ this.form.rollNo = ''
+ }).catch((error)=>{
+ this.form.rollNo = ''
+ this.$message.error(error)
+ })
+
+ },
+ handleGetRollDataList(row){
+ this.form = {
+ ...row,
+ openDetail:true,
+ }
+ this.getDataList();
+ this.open = true;
+ },
+ handleRollRemove(row){
+ this.$confirm('确定要删除这条数据?', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(()=>{
+ removeShipmentRollData(row).then(({data})=>{
+ if (data && data.code === 0){
+ this.getDataList();
+ this.$message.success(data.msg)
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ })
+ },
+ handleEndBox(){
+ this.endForm = {
+ warehouseId:'',
+ shipmentDate:'',
+ }
+ let params = {
+ ...this.form,
+ }
+ getShipmentRollAllData(params).then(({data})=>{
+ if (data && data.code === 0){
+ this.endDataList = data.rows
+ this.endOpen = true;
+ }else {
+ this.$message.warning(data.msg)
+ }
+ }).catch((error)=>{
+ this.$message.error(error)
+ })
+ }
+ }
}
@@ -21,21 +171,122 @@ export default {
-
新增箱子
-
最终出库
+
新增箱子
+
最终出库
-
+
+
+
+
- 查看
+ 扫描
+ 封箱
+ 删除
+ 查看
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 最终出库
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+