领用仓库与当前仓库修改,领用打印等功能

20231126-yw
anthonywj 1 year ago
parent d4ff3a8297
commit 23d148999e

@ -46,5 +46,20 @@ export function addOrderDetailAndApply(data) {
}
export function printOrder(data) {
return axios({
url: "/pur/receive/order/printOrder",
method: "post",
data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}

@ -98,12 +98,19 @@
<el-table-column width="150" label="生产企业" prop="manufacturer" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.index == selectedIndex" @click.stop="true" @click.native="saveChange(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.index != selectedIndex" @click.stop="true" @click.native="rowChange(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.index == selectedIndex" @click.stop="true"
@click.native="saveChange(scope.row)">保存
</el-button>
<el-button type="text" size="small" v-if="scope.row.index != selectedIndex" @click.stop="true"
@click.native="rowChange(scope.row)">编辑
</el-button>
<el-button type="text" size="small" @click.stop="true" @click.native="copyDetail(scope.row)">复制</el-button>
<el-button type="text" size="small" @click.stop="true" @click.native="deleteDetail(scope.row)">删除</el-button>
<el-button type="text" size="small" v-if="scope.row.bindRlFk==null" @click.native.stop="bindRl(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.supId==null" @click.native.stop="handleUnitClick(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.bindRlFk==null" @click.native.stop="bindRl(scope.row)">
绑定产品
</el-button>
<el-button type="text" size="small" v-if="scope.row.supId==null"
@click.native.stop="handleUnitClick(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
@ -324,6 +331,8 @@ export default {
} else if (this.curBustype.corpType === 1) {//
this.invQueryData.invCode = this.idQuery.invCode;
this.selectInvProductVisible = true;
} else if (this.curBustype.corpType = 4) {
this.selectProductVisible = true;
}
},

@ -10,7 +10,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="当前仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 100%;">
<el-select v-model="filterQuery.targetInvCode" placeholder="请选择当前仓库" style="width: 100%;">
<el-option
v-for="item in invList"
:key="item.code"
@ -166,7 +166,6 @@ export default {
page: 1,
limit: 10,
corpName: this.$store.getters.locInvName,
invCode: '',
type: 2,
editStatus: 2,
targetInvCode: null,
@ -245,7 +244,7 @@ export default {
page: 1,
limit: 10,
corpName: null,
invCode: this.invCodebe,
targetInvCode: this.invCodebe,
type: 2,
editStatus: 2,
};
@ -350,7 +349,7 @@ export default {
page: 1,
limit: 10,
corpName: null,
invCode: this.invCodebe,
targetInvCode: this.invCodebe,
type: 2,
editStatus: 2,
};
@ -363,8 +362,8 @@ export default {
.then((response) => {
this.invList = response.data || [];
if (this.invList.length > 0) {
this.filterQuery.invCode = this.invList[0].code
this.invCodebe = this.filterQuery.invCode
this.filterQuery.targetInvCode = this.invList[0].code
this.invCodebe = this.filterQuery.targetInvCode
}
this.getList();
})

@ -1,16 +1,16 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8" >
<el-col :span="8">
<el-form-item label="领用单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 90%;">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 90%;">
<el-option
v-for="item in invList"
:key="item.code"
@ -22,7 +22,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="往来信息:">
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
filterable
remote
reserve-keyword
@ -102,8 +102,9 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true" @current-change="handleDetail"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo"></el-table-column>
<el-table-column label="领用部门" prop="deptName"></el-table-column>
@ -117,9 +118,18 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
>打印
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -160,7 +170,7 @@
</template>
<script>
import {getOrderDetail, getReceiveOrder} from "@/api/inout/receiveOrder";
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
import auditDetail from "@/views/inout/receive/receiveAuditDetail"
import {delReceive} from "@/api/thrsys/thrOrderReceive";
import {filterSubAll, findInvByUser} from "@/api/system/invSubWarehouse";
@ -180,7 +190,7 @@ export default {
corpName: null,
type: 3,
editStatus: 2,
invCode:null
invCode: null
},
statusMap: {
1: "草稿",
@ -188,17 +198,17 @@ export default {
3: "已审核",
4: "已拒绝"
},
idQuery:null,
invList:[],
invCodebe:null,
newSpDistributionVisible:false,
idQuery: null,
invList: [],
invCodebe: null,
newSpDistributionVisible: false,
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
corpList:[],
corpList: [],
detailList: [],
uploadFileUrl: null,
fileList: [],
@ -320,7 +330,7 @@ export default {
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
this.detailList=null;
this.detailList = null;
} else {
this.$message.error(response.message);
}
@ -360,7 +370,7 @@ export default {
}
this.filterQuery.isUser = true;
this.loading = true;
this.detailList=[]
this.detailList = []
getReceiveOrder(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
@ -378,7 +388,7 @@ export default {
});
},
handleDetail(row) {
var query={};
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
@ -392,11 +402,11 @@ export default {
this.filterQuery.page = val.page;
this.getList();
},
finCorpList(val){
let query ={
name : val,
page : 1,
limit : 10,
finCorpList(val) {
let query = {
name: val,
page: 1,
limit: 10,
}
filterSubAll(query)
.then((response) => {
@ -417,9 +427,9 @@ export default {
findInvByUser(query)
.then((response) => {
this.invList = response.data || [];
if(this.invList.length>0){
this.filterQuery.invCode=this.invList[0].code
this.invCodebe=this.filterQuery.invCode
if (this.invList.length > 0) {
this.filterQuery.invCode = this.invList[0].code
this.invCodebe = this.filterQuery.invCode
}
this.getList();
})
@ -427,6 +437,29 @@ export default {
});
},
printOrder(row) {
printOrder(row)
.then((response) => {
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
this.getList();
})
.catch(() => {
});
},
closeDialog() {
this.newSpDistributionVisible = false;
},
},
components: {
auditDetail

@ -1,16 +1,16 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="8" >
<el-col :span="8">
<el-form-item label="领用单号:">
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择领用仓库" style="width: 90%;">
<el-select v-model="filterQuery.targetInvCode" placeholder="请选择领用仓库" style="width: 90%;">
<el-option
v-for="item in invList"
:key="item.code"
@ -22,7 +22,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="往来信息:">
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
<el-select v-model="filterQuery.corpName" placeholder="请输入往来信息"
filterable
remote
reserve-keyword
@ -91,7 +91,6 @@
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
@ -102,8 +101,9 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true" @current-change="handleDetail"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
@current-change="handleDetail"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="领用单号" prop="billNo"></el-table-column>
<el-table-column label="领用部门" prop="deptName"></el-table-column>
@ -117,12 +117,15 @@
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime"
sortable="custom" :sort-orders="['ascending', 'descending']" ></el-table-column>
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="审核时间" prop="auditTime"
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
<el-table-column label="操作" >
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)"
>打印
</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
</template>
@ -167,7 +170,7 @@
</template>
<script>
import {getOrderDetail, getReceiveOrder} from "@/api/inout/receiveOrder";
import {getOrderDetail, getReceiveOrder, printOrder} from "@/api/inout/receiveOrder";
import auditDetail from "@/views/inout/receive/receiveAuditDetail"
import {delReceive} from "@/api/thrsys/thrOrderReceive";
import {filterSubAll, findInvByUser} from "@/api/system/invSubWarehouse";
@ -186,7 +189,7 @@ export default {
limit: 10,
corpName: null,
type: 3,
invCode:null
targetInvCode: null,
},
statusMap: {
1: "草稿",
@ -194,17 +197,17 @@ export default {
3: "已审核",
4: "已拒绝"
},
idQuery:null,
invList:[],
invCodebe:null,
newSpDistributionVisible:false,
idQuery: null,
invList: [],
invCodebe: null,
newSpDistributionVisible: false,
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
corpList:[],
corpList: [],
detailList: [],
uploadFileUrl: null,
fileList: [],
@ -296,7 +299,7 @@ export default {
limit: 10,
corpName: null,
type: 3,
invCode: this.invCodebe,
targetInvCode: this.invCodebe,
};
this.actDateRange = [];
this.actAuditDateRange = [];
@ -325,7 +328,7 @@ export default {
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
this.detailList=null;
this.detailList = null;
} else {
this.$message.error(response.message);
}
@ -364,7 +367,7 @@ export default {
this.filterQuery.endAuditTime = null;
}
this.loading = true;
this.detailList=[]
this.detailList = []
getReceiveOrder(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
@ -382,7 +385,7 @@ export default {
});
},
handleDetail(row) {
var query={};
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
@ -396,11 +399,11 @@ export default {
this.filterQuery.page = val.page;
this.getList();
},
finCorpList(val){
let query ={
name : val,
page : 1,
limit : 10,
finCorpList(val) {
let query = {
name: val,
page: 1,
limit: 10,
}
filterSubAll(query)
.then((response) => {
@ -421,9 +424,9 @@ export default {
findInvByUser(query)
.then((response) => {
this.invList = response.data || [];
if(this.invList.length>0){
this.filterQuery.invCode=this.invList[0].code
this.invCodebe=this.filterQuery.invCode
if (this.invList.length > 0) {
this.filterQuery.targetInvCode = this.invList[0].code
this.invCodebe = this.filterQuery.targetInvCode
}
this.getList();
})
@ -431,6 +434,27 @@ export default {
});
},
printOrder(row) {
printOrder(row)
.then((response) => {
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
this.getList();
})
.catch(() => {
});
},
closeDialog() {
this.newSpDistributionVisible = false;
},
},
components: {
auditDetail

@ -16,10 +16,10 @@
@change="getDeptList"
>
<el-option
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
@ -36,15 +36,15 @@
<el-col :span="8">
<el-form-item label="登记时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
style="width: 90%"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
>
</el-date-picker>
</el-form-item>
@ -85,25 +85,25 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="formVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="formVisible"
:title="formMap[formName]"
:visible.sync="formVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="formVisible"
>
<deviceReceiveOrderModify
:deviceReceiveOrder="deviceReceiveOrder"
:closeDialog="closeDialog"
:deviceReceiveOrder="deviceReceiveOrder"
:closeDialog="closeDialog"
></deviceReceiveOrderModify>
</el-dialog>
<el-card class="el-card">
@ -131,11 +131,11 @@
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:limit.sync="detailQuery.limit"
:page.sync="detailQuery.page"
@pagination="getDetailList"
v-show="detailTotal>0"
:total="detailTotal"
:limit.sync="detailQuery.limit"
:page.sync="detailQuery.page"
@pagination="getDetailList"
></pagination>
</el-card>
@ -299,12 +299,12 @@ export default {
getInvList() {
let params = {deptCode: this.filterQuery.fromDeptCode};
findInvByUser(params)
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
},
getSpaceList() {
let params = {
@ -332,7 +332,7 @@ export default {
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
@ -346,103 +346,101 @@ export default {
this.$message.error(error.message);
})
},
addReceiveOrder() {
this.formVisible = true;
this.formName = 'add';
this.deviceReceiveOrder = {};
},
editOrder(row) {
this.formVisible = true;
this.formName = 'edit';
this.deviceReceiveOrder = row;
},
submitAudit(row) {
let params = {id: row.id};
submitAudit(params).then((res) => {
if (res.code === 20000) {
this.$message.success("提交成功!");
this.getList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
},
deleteDialog(rowId) {
this.$confirm('此操作将永久删除该领用记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
this.loading = true;
deleteDeviceReceiveOrder(params).then((res) => {
this.loading = false;
addReceiveOrder() {
this.formVisible = true;
this.formName = 'add';
this.deviceReceiveOrder = {};
},
editOrder(row) {
this.formVisible = true;
this.formName = 'edit';
this.deviceReceiveOrder = row;
},
submitAudit(row) {
let params = {id: row.id};
submitAudit(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功!");
this.$message.success("提交成功!");
this.getList();
this.detailList = []
} else {
this.$message.error(res.message);
}
}).catch(() => {
this.loading = false;
}).catch((error) => {
this.$message.error(error.message);
});
});
},
closeDialog() {
this.formVisible = false;
this.getList();
},
datailSelect(row) {
this.detailQuery = row
this.deviceProjectSelectVisible = true
},
handleChange(row) {
this.detailQuery.orderIdFk = row.orderId;
this.detailQuery.page = 1;
this.getDetailList();
},
getDetailList() {
getDeviceReceiveOrderDetailList(this.detailQuery).then((res) => {
if (res.code === 20000) {
this.detailList = res.data.list || [];
this.detailTotal = res.data.total || 0;
} else {
},
deleteDialog(rowId) {
this.$confirm('此操作将永久删除该领用记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
this.loading = true;
deleteDeviceReceiveOrder(params).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.$message.success("删除成功!");
this.getList();
this.detailList = []
} else {
this.$message.error(res.message);
}
}).catch(() => {
this.loading = false;
});
});
},
closeDialog() {
this.formVisible = false;
this.getList();
},
datailSelect(row) {
this.detailQuery = row
this.deviceProjectSelectVisible = true
},
handleChange(row) {
this.detailQuery.orderIdFk = row.orderId;
this.detailQuery.page = 1;
this.getDetailList();
},
getDetailList() {
getDeviceReceiveOrderDetailList(this.detailQuery).then((res) => {
if (res.code === 20000) {
this.detailList = res.data.list || [];
this.detailTotal = res.data.total || 0;
} else {
this.detailList = [];
this.detailTotal = 0;
}
}).catch(() => {
this.detailList = [];
this.detailTotal = 0;
});
},
}
,
components: {
deviceReceiveOrderModify
}
,
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}
,
created() {
//
getConfig().then((res) => {
if (res.code == 20000 && !isBlank(res.data.paramValue)) {
this.paramValue = res.data.paramValue
}
}).catch(() => {
this.detailList = [];
this.detailTotal = 0;
});
},
}
,
components: {
deviceReceiveOrderModify
}
,
mounted()
{
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}
,
created()
{
//
getConfig().then((res) => {
if (res.code == 20000 && !isBlank(res.data.paramValue)) {
this.paramValue = res.data.paramValue
}
})
this.getDeptList();
}
,
})
this.getDeptList();
}
,
}
;
</script>

@ -132,11 +132,10 @@
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="在库数量" prop="invCount" width="90"></el-table-column>
<el-table-column label="定额数量" prop="rationCount" width="90"></el-table-column>
<el-table-column label="剩余数量" width="90">
<el-table-column label="需补数量" width="90">
<template slot-scope="scope">
<span :style="{ color: scope.row.invCount - scope.row.rationCount<0 ? 'red' : 'blue' }">{{
scope.row.invCount - scope.row.rationCount
<span :style="{ color: scope.row.rationCount - scope.row.invCount>0 ? 'red' : null }">{{
scope.row.rationCount - scope.row.invCount > 0 ? scope.row.rationCount - scope.row.invCount : 0
}}</span>
</template>
</el-table-column>

@ -32,7 +32,8 @@
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" @click.native="handleForm(null, null)" icon="el-icon-plus"
:disabled="!configParms.sysUser && query.customerId == 110"
v-hasPermi="['system:user:add']">新增</el-button>
v-hasPermi="['system:user:add']">新增
</el-button>
</el-button-group>
</div>
@ -369,7 +370,7 @@ export default {
};
},
methods: {
getDeptList(){
getDeptList() {
},
hideSearch() {

Loading…
Cancel
Save