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

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();
})

@ -102,7 +102,8 @@
<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"
<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>
@ -120,6 +121,15 @@
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";
@ -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

@ -10,7 +10,7 @@
</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"
@ -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,7 +101,8 @@
<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"
<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>
@ -122,6 +122,9 @@
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>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button>
@ -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: "草稿",
@ -296,7 +299,7 @@ export default {
limit: 10,
corpName: null,
type: 3,
invCode: this.invCodebe,
targetInvCode: this.invCodebe,
};
this.actDateRange = [];
this.actAuditDateRange = [];
@ -422,8 +425,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();
})
@ -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

@ -424,16 +424,14 @@ components: {
deviceReceiveOrderModify
}
,
mounted()
{
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}
,
created()
{
created() {
//
getConfig().then((res) => {
if (res.code == 20000 && !isBlank(res.data.paramValue)) {

@ -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>

Loading…
Cancel
Save