内部码打印代码提交
parent
a21953207c
commit
86eeffe62c
@ -0,0 +1,75 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
|
||||||
|
export function getLocalBusType(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getLocalJoinBusType(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/filterJoin",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getLocalJoinByUser(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/filterJoinByUser",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getLocalJoinNoUse(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/filterUnUse",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterByBus(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/filterByBus",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function addLocalBusType(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/add",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function deleteLocalBusType(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/delete",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateLocalBusType(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/update",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterForThirdSys() {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/localBusType/filterForThirdSys",
|
||||||
|
method: "get",
|
||||||
|
param: null
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
/**
|
||||||
|
* Created by lk on 17/6/4.
|
||||||
|
*/
|
||||||
|
import axios from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
export function stockQRCodeText(query) {
|
||||||
|
return axios(
|
||||||
|
{
|
||||||
|
url: "/udiwms/stock/qrcode/text/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function filterPrint(query) {
|
||||||
|
return axios(
|
||||||
|
{
|
||||||
|
url: "/spms/stockPrint/filter",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,106 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
|
||||||
|
export function listInnerOrder(query) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function auditListInnerOrder(query) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/auditList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function listInnerOrderDetail(query) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/list/detail',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getInnerOrder(id) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addInnerOrder(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function auditOrder(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/auditOrder',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 修改pur
|
||||||
|
export function updateInnerOrder(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除pur
|
||||||
|
export function delInnerOrder(id) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function inserThrOrderWeb(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/inv/inner/order/postOrder",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 删除pur
|
||||||
|
export function delInnerOrderDetail(id) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/detail/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 添加打印详情
|
||||||
|
export function addOrderDetail(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/insertDetail',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新打印详情
|
||||||
|
export function updateOrderDetail(data) {
|
||||||
|
return axios({
|
||||||
|
url: '/inv/inner/order/updateDetail',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,400 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<el-form :model="filterQuery" label-width="120px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="单据号">
|
||||||
|
<el-input v-model="filterQuery.recordKey" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="单据日期">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 90%"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
v-model="actDateRange"
|
||||||
|
type="daterange"
|
||||||
|
format="yyyy 年 MM 月 dd 日"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button-group style="display:flex;">
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
||||||
|
<el-button type="primary" icon="search" @click="onSubmitFind">查询</el-button>
|
||||||
|
<el-button type="primary" icon="search" @click="newDistributionForm()" :loading="loading">
|
||||||
|
新增打印单
|
||||||
|
</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row="true"
|
||||||
|
@current-change="handleDetail">
|
||||||
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||||
|
<el-table-column label="单据号" prop="recordKey"></el-table-column>
|
||||||
|
<el-table-column label="创建日期" prop="createTime">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建人" prop="createUser"></el-table-column>
|
||||||
|
<el-table-column label="备注说明" prop="remark"></el-table-column>
|
||||||
|
<el-table-column label="打印状态" prop="printStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag :type="(scope.row.printStatus) | statusFilterType">
|
||||||
|
{{ statusPrintMap[scope.row.printStatus] }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑</el-button>
|
||||||
|
<el-button type="text" size="small" @click.native="printQRCodeText(scope.row)">打印</el-button>
|
||||||
|
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="handleCurrentChange"
|
||||||
|
></pagination>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
|
||||||
|
<el-table-column label="序号" type="index" width="120"></el-table-column>
|
||||||
|
<el-table-column label="产品编码" prop="productId"></el-table-column>
|
||||||
|
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="生产日期" prop="productDate" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="失效日期" prop="expireDate" show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="打印数量" prop="count"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:title="formMap[formName]"
|
||||||
|
:visible.sync="newSpDistributionVisible"
|
||||||
|
width="80%"
|
||||||
|
v-if="newSpDistributionVisible"
|
||||||
|
@close='closeDialog'
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<pureApplyEdit
|
||||||
|
:closeDialog="closeDialog"
|
||||||
|
:idQuery="idQuery"
|
||||||
|
></pureApplyEdit>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="内部码标签打印"
|
||||||
|
:visible.sync="qrcodeExportVisible"
|
||||||
|
width="80%"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
v-if="qrcodeExportVisible"
|
||||||
|
@close='closeQRCodeExportDialog'
|
||||||
|
>
|
||||||
|
<innerCodeDetail
|
||||||
|
:closeDialog="closeQRCodeExportDialog"
|
||||||
|
:inQuery="inQuery"
|
||||||
|
></innerCodeDetail>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import pureApplyEdit from "./innerOrderEditDialog";
|
||||||
|
import innerCodeDetail from "./innerCodeDetail";
|
||||||
|
|
||||||
|
import {delInnerOrder, inserThrOrderWeb, listInnerOrder, listInnerOrderDetail} from "@/api/inventory/innerOrder";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filterQuery: {
|
||||||
|
recordKey: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
editStatus: 1,
|
||||||
|
},
|
||||||
|
formName: null,
|
||||||
|
formMap: {
|
||||||
|
add: "新增打印单据",
|
||||||
|
update: "编辑打印单据",
|
||||||
|
},
|
||||||
|
statusMap: {
|
||||||
|
1: "未生成",
|
||||||
|
2: "已生成",
|
||||||
|
},
|
||||||
|
statusPrintMap: {
|
||||||
|
1: "未打印",
|
||||||
|
2: "已打印",
|
||||||
|
},
|
||||||
|
idQuery: {},
|
||||||
|
inQuery: {},
|
||||||
|
total: 0,
|
||||||
|
thirdSys: [],
|
||||||
|
thirdSysDetail: null,
|
||||||
|
busTypes: [],
|
||||||
|
originTypes: [],
|
||||||
|
list: [],
|
||||||
|
detailList: [],
|
||||||
|
loading: false,
|
||||||
|
actDateRange: [],
|
||||||
|
newSpDistributionVisible: false,
|
||||||
|
qrcodeExportVisible: false,
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: "最近一周",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "最近一个月",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "最近三个月",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
recordKey: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
editStatus: 1,
|
||||||
|
};
|
||||||
|
this.actDateRange = [];
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
onSubmitFind() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
if (this.actDateRange != null) {
|
||||||
|
this.filterQuery.startDate = this.actDateRange[0];
|
||||||
|
this.filterQuery.endDate = this.actDateRange[1];
|
||||||
|
} else {
|
||||||
|
this.filterQuery.startDate = null;
|
||||||
|
this.filterQuery.endDate = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
listInnerOrder(this.filterQuery)
|
||||||
|
.then((response) => {
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.list = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDetail(row) {
|
||||||
|
let query = {orderIdFk: row.id};
|
||||||
|
this.loading = true;
|
||||||
|
listInnerOrderDetail(query) //查找该单号下的所有条码
|
||||||
|
.then((response) => {
|
||||||
|
this.detailList = response.data.list || [];
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.detailList = [];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitOrder(row) {
|
||||||
|
this.loading = true;
|
||||||
|
let tQuery = {
|
||||||
|
editStatus: 2,
|
||||||
|
purApplyEntity: row,
|
||||||
|
}
|
||||||
|
inserThrOrderWeb(tQuery)
|
||||||
|
.then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.$message.success("提交成功!");
|
||||||
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deleteDialog(row) {
|
||||||
|
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
delInnerOrder(row.id)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
this.getList();
|
||||||
|
this.detailList="";
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val.page;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
closeDialog() {
|
||||||
|
this.newSpDistributionVisible = false;
|
||||||
|
this.getList();
|
||||||
|
this.detailList = [];
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
closeQRCodeExportDialog() {
|
||||||
|
this.qrcodeExportVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
printQRCodeText(row) {
|
||||||
|
this.inQuery.id = '';
|
||||||
|
if (this.$isNotBlank(row.id)) {
|
||||||
|
this.inQuery.id = row.recordKey;
|
||||||
|
this.inQuery.formData = row;
|
||||||
|
this.qrcodeExportVisible = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
newDistributionForm(index, row) {
|
||||||
|
this.idQuery.id = '';
|
||||||
|
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
|
||||||
|
this.idQuery.id = row.id;
|
||||||
|
this.idQuery.formData = row;
|
||||||
|
this.formName = "update";
|
||||||
|
} else
|
||||||
|
this.formName = "add";
|
||||||
|
this.newSpDistributionVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
,
|
||||||
|
components: {
|
||||||
|
pureApplyEdit,innerCodeDetail
|
||||||
|
}
|
||||||
|
,
|
||||||
|
filters: {
|
||||||
|
statusFilterType(status) {
|
||||||
|
const statusMap = {
|
||||||
|
1: "warning",
|
||||||
|
2: "success",
|
||||||
|
};
|
||||||
|
return statusMap[status];
|
||||||
|
}
|
||||||
|
,
|
||||||
|
}
|
||||||
|
,
|
||||||
|
mounted() {
|
||||||
|
}
|
||||||
|
,
|
||||||
|
created() {
|
||||||
|
let end = new Date();
|
||||||
|
let start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
this.actDateRange = [start, end];
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
,
|
||||||
|
}
|
||||||
|
;
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.itemTag {
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
margin-top: 10px;
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-form-item {
|
||||||
|
display: block !important;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-col {
|
||||||
|
border-radius: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,410 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :model="formData" :rules="formRules" label-width="120px" ref="dataForm">
|
||||||
|
<el-row type="flex" justify="end">
|
||||||
|
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click.native="saveOrder('2')"
|
||||||
|
:loading="loading"
|
||||||
|
>提交单据
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-button-group>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-card style="margin-top: -5px;" >
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="单据号" prop="billNo">
|
||||||
|
<el-input v-model="formData.billNo" style="width: 90%" auto-complete="off" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="单据日期" prop="billNo">
|
||||||
|
<el-input v-model="formData.billDate" style="width: 90%" auto-complete="off" :disabled="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="打印说明" prop="billNo">
|
||||||
|
<el-input v-model="formData.remark" style="width: 90%" auto-complete="off" type="textarea" autosize></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<el-button-group style="display: flex">
|
||||||
|
<el-button type="primary" size="small" @click.native.stop="selectProductFunction()" style="margin: 0px 60px 10px auto; height: 35px" :loading="loading">产品录入</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" :row-class-name="tableRowClassName" border max-height="300" height="300" ref="multipleTable">
|
||||||
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="单据数量">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input size="small" v-model="scope.row.count"
|
||||||
|
placeholder="请输入数量" style="width: 80%"
|
||||||
|
type='number'
|
||||||
|
:disabled="scope.row.index !== selectedIndex"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="批次号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input size="small" v-model="scope.row.batchNo"
|
||||||
|
:disabled="scope.row.index !== selectedIndex"
|
||||||
|
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
|
||||||
|
ref='inputBatchNoRef'
|
||||||
|
placeholder="请输入批次号" style="width: 80%"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="生产日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.productDate" auto-complete="off"
|
||||||
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
||||||
|
:disabled="scope.row.index !== selectedIndex"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="失效日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.expireDate" auto-complete="off"
|
||||||
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
||||||
|
:disabled="scope.row.index !== selectedIndex"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" :disabled="scope.row.index !== selectedIndex" @click.stop="true" @click.native="addRowChang(scope.row)">提交</el-button>
|
||||||
|
<el-button type="text" size="small" :disabled="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="deleteCodeArray(scope.$index, scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="产品录入"
|
||||||
|
:visible.sync="selectProductVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="80%"
|
||||||
|
v-if="selectProductVisible"
|
||||||
|
:append-to-body='true'
|
||||||
|
>
|
||||||
|
<stockOrderNewSelectProduct
|
||||||
|
:closeDialog="closeDialogC2"
|
||||||
|
:data="thisData"
|
||||||
|
:pId="pId"
|
||||||
|
:filterType="2"
|
||||||
|
></stockOrderNewSelectProduct>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import draggable from "vuedraggable";
|
||||||
|
import stockOrderNewSelectProduct from "@/views/inventory/inner/innerOrderSelectProduct";
|
||||||
|
import {
|
||||||
|
inserThrOrderWeb,
|
||||||
|
delInnerOrderDetail,
|
||||||
|
listInnerOrderDetail,
|
||||||
|
updateOrderDetail
|
||||||
|
} from "@/api/inventory/innerOrder";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "idQuery",
|
||||||
|
props: {
|
||||||
|
closeDialog: {
|
||||||
|
type: Function,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
idQuery: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
code: "",
|
||||||
|
query: {
|
||||||
|
orderIdFk: "",
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
id: null,
|
||||||
|
billNo: null,
|
||||||
|
billDate: "",
|
||||||
|
remark: "",
|
||||||
|
deptCode: null,
|
||||||
|
locStorageCode: null,
|
||||||
|
invWarehouseCode: null,
|
||||||
|
},
|
||||||
|
formRules: {},
|
||||||
|
codeArray: [],
|
||||||
|
total: 0,
|
||||||
|
pId:null,
|
||||||
|
loading: false,
|
||||||
|
index: null,
|
||||||
|
formLoading: false,
|
||||||
|
formVisible: false,
|
||||||
|
deleteLoading: false,
|
||||||
|
orderNo: null,
|
||||||
|
statusMap: {
|
||||||
|
1: "草稿",
|
||||||
|
2: "未审核",
|
||||||
|
3: "已审核",
|
||||||
|
},
|
||||||
|
typeMap: {
|
||||||
|
1: "预入库",
|
||||||
|
2: "普通采购",
|
||||||
|
},
|
||||||
|
orderEditor: true,
|
||||||
|
sOptions: [],
|
||||||
|
sValue: [],
|
||||||
|
sList: [],
|
||||||
|
sLoading: false,
|
||||||
|
busTypes: [],
|
||||||
|
currentRow: {},
|
||||||
|
selectedIndex: "",
|
||||||
|
selectProductVisible: false,
|
||||||
|
thisData: {},
|
||||||
|
storageList: [],
|
||||||
|
subInvList: [],
|
||||||
|
invQueryData: {},
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
draggable,
|
||||||
|
stockOrderNewSelectProduct,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
saveOrder(status) {
|
||||||
|
this.$refs["dataForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.codeArray.length < 1) {
|
||||||
|
this.$message.warning('未添加产品');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (status === '0') {
|
||||||
|
for (let i = 0; i < this.codeArray.length; i++) {
|
||||||
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count === 0) {
|
||||||
|
return this.$message.error('单据数量不能为0');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (status == "1") {
|
||||||
|
this.submitFunction(status);
|
||||||
|
} else {
|
||||||
|
if (this.codeArray.length < 1) {
|
||||||
|
this.$message.warning('未添加产品');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < this.codeArray.length; i++) {
|
||||||
|
if (isBlank(this.codeArray[i].count) || this.codeArray[i].count === 0) {
|
||||||
|
this.$message.error('单据数量不能为0');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let tip = "是否确定提交订单?";
|
||||||
|
this.$confirm(tip, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
this.submitFunction(status);
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitFunction(status) {
|
||||||
|
let tMessage = status === '1' ? '保存' : '提交';
|
||||||
|
this.loading = true;
|
||||||
|
let tQuery = {
|
||||||
|
editStatus: status,
|
||||||
|
innerOrderEntity: this.formData,
|
||||||
|
}
|
||||||
|
inserThrOrderWeb(tQuery)
|
||||||
|
.then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.$message.success(tMessage + "成功");
|
||||||
|
this.closeDialog(true);
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addRowChang(row){
|
||||||
|
updateOrderDetail(row);
|
||||||
|
this.selectedIndex = "";
|
||||||
|
},
|
||||||
|
selectProductFunction() {
|
||||||
|
if(this.query.id==null) {
|
||||||
|
inserThrOrderWeb({innerOrderEntity: this.formData})
|
||||||
|
.then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.pId=response.data;
|
||||||
|
this.formData.id=this.pId
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.selectProductVisible = true;
|
||||||
|
},
|
||||||
|
closeDialogC2(rData) {
|
||||||
|
this.selectProductVisible = false;
|
||||||
|
this.getStockOrderDetailList();
|
||||||
|
},
|
||||||
|
rowChange(val) {
|
||||||
|
this.currentRow = val;
|
||||||
|
this.selectedIndex = val.index;
|
||||||
|
},
|
||||||
|
tableCountChange(row) {
|
||||||
|
if (this.$isNotBlank(row)) {
|
||||||
|
// row.count = row.reCount;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tableRowClassName({row, rowIndex}) {
|
||||||
|
row.index = rowIndex;
|
||||||
|
},
|
||||||
|
// 刷新表单
|
||||||
|
resetForm() {
|
||||||
|
if (this.$refs["dataForm"]) {
|
||||||
|
// 清空验证信息表单
|
||||||
|
this.$refs["dataForm"].clearValidate();
|
||||||
|
// 刷新表单
|
||||||
|
this.$refs["dataForm"].resetFields();
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteCodeArray(index, row) {
|
||||||
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
}).then(() => {
|
||||||
|
this.$refs.multipleTable.setCurrentRow();
|
||||||
|
this.currentRow = {};
|
||||||
|
this.selectedIndex = "";
|
||||||
|
|
||||||
|
if (this.orderEditor) {
|
||||||
|
this.detailLoading = true;
|
||||||
|
if (this.$isNotBlank(row.id)) {
|
||||||
|
delInnerOrderDetail(row.id)
|
||||||
|
.then(response => {
|
||||||
|
this.detailLoading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.$message.success(response.data);
|
||||||
|
// this.getStockOrderDetailList();
|
||||||
|
this.codeArray.splice(index, 1);
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.detailLoading = false;
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this.codeArray.splice(index, 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.success('删除成功');
|
||||||
|
this.codeArray.splice(index, 1);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getStockOrderDetailList() {
|
||||||
|
this.loading = true;
|
||||||
|
listInnerOrderDetail({orderIdFk:this.pId}) //查找该单号下的所有条码
|
||||||
|
.then((response) => {
|
||||||
|
this.codeArray = response.data.list || [];
|
||||||
|
this.total = response.data.total || 0;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
filters: {},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
if (this.$isNotBlank(this.idQuery.id)) {
|
||||||
|
this.query.limit = 100;
|
||||||
|
this.query.orderIdFk = this.idQuery.id;
|
||||||
|
this.formData = this.idQuery.formData;
|
||||||
|
this.formData.billNo = this.idQuery.formData.recordKey;
|
||||||
|
this.formData.billDate = this.idQuery.formData.createTime;
|
||||||
|
this.orderEditor = true;
|
||||||
|
this.sValue = this.formData.corpName;
|
||||||
|
this.getStockOrderDetailList();
|
||||||
|
} else {
|
||||||
|
this.formData = {
|
||||||
|
id: null,
|
||||||
|
billNo: null,
|
||||||
|
billDate: "",
|
||||||
|
remark: "",
|
||||||
|
deptCode: null,
|
||||||
|
locStorageCode: null,
|
||||||
|
invWarehouseCode: null,
|
||||||
|
};
|
||||||
|
this.orderEditor = false;
|
||||||
|
}
|
||||||
|
this.codeArray = [];
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.ao-text {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: "Microsoft YaHei";
|
||||||
|
float: right;
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,387 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<el-form :model="listQuery" label-width="120px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="UDI码:" class="query-form-item">
|
||||||
|
<el-input v-model="listQuery.nameCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true" @keyup.enter.native="keyup_submit($event)"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="第三方产品编码:" class="query-form-item">
|
||||||
|
<el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方产品编码" clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="物品编码:" class="query-form-item">
|
||||||
|
<el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码" clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="产品通用名:" class="query-form-item">
|
||||||
|
<el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名" clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="规格型号:" class="query-form-item">
|
||||||
|
<el-input v-model="listQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="生产企业:" class="query-form-item">
|
||||||
|
<el-input v-model="listQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</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>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect">确定</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
|
||||||
|
<el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row :row-class-name="tableRowClassName" @current-change="handleChange" ref="multipleTable">
|
||||||
|
<el-table-column label width="45">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="最小销售产品标识" prop="nameCode" width="140" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="产品编码" prop="thirdId" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc"></el-table-column>
|
||||||
|
<el-table-column label="产品通用名" prop="cpmctymc" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="注册/备案凭证" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="器械类别" prop="qxlb" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="配送企业" prop="companyName" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="操作" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="small" @click.native.stop="handleDetailClick(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="pageTotal>0"
|
||||||
|
:total="pageTotal"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.limit"
|
||||||
|
@pagination="handleErpPageChange"
|
||||||
|
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="耗材字典详情"
|
||||||
|
:visible.sync="udiRlDetailVisible"
|
||||||
|
width="80%"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
append-to-body
|
||||||
|
v-if="udiRlDetailVisible"
|
||||||
|
>
|
||||||
|
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="" prop="isGive">
|
||||||
|
<el-radio-group v-model="currentCert">
|
||||||
|
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="selectCert">确 定</el-button>
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {filterCompanyProductRelevance} from "../../../api/basic/udiRlSuptRelevance";
|
||||||
|
import {addApplyDetail,addApply} from "../../../api/purchase/purApply";
|
||||||
|
import store from "../../../store";
|
||||||
|
import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog";
|
||||||
|
import {addOrderDetail} from "@/api/inventory/innerOrder";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "stockOrderNewSelectProduct",
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
closeDialog: {
|
||||||
|
type: Function,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
purType: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
pId: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
listQuery: {
|
||||||
|
purType: null,
|
||||||
|
udiCode: null,
|
||||||
|
unicode: null,
|
||||||
|
cpmctymc: null,
|
||||||
|
ggxh: null,
|
||||||
|
ylqxzcrbarmc: null,
|
||||||
|
thrPiId: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
},
|
||||||
|
combineQuery: {
|
||||||
|
thirdId: "",
|
||||||
|
relId: "",
|
||||||
|
erpName: "",
|
||||||
|
keys: [],
|
||||||
|
},
|
||||||
|
ids:[],
|
||||||
|
radioCheck: null,
|
||||||
|
dataList: [],
|
||||||
|
pageTotal: 1,
|
||||||
|
total: 1,
|
||||||
|
currentRow: null,
|
||||||
|
loading: false,
|
||||||
|
udiRlDetailVisible: false,
|
||||||
|
thirdSys: [],
|
||||||
|
thirdSysFk: null,
|
||||||
|
busTypes: [],
|
||||||
|
actDateRange: [],
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: "最近一周",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "最近一个月",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "最近三个月",
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||||
|
picker.$emit("pick", [start, end]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
orderEditor: false,
|
||||||
|
orderId: "",
|
||||||
|
currentCert: null,
|
||||||
|
certList: [],
|
||||||
|
dialogFormVisible: false,
|
||||||
|
multipleSelection: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.listQuery = {
|
||||||
|
purType: null,
|
||||||
|
udiCode: null,
|
||||||
|
unicode: null,
|
||||||
|
cpmctymc: null,
|
||||||
|
ggxh: null,
|
||||||
|
ylqxzcrbarmc: null,
|
||||||
|
thrPiId: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
}
|
||||||
|
this.multipleSelection = [];
|
||||||
|
this.radioCheck = null;
|
||||||
|
this.currentRow = null;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
tableRowClassName({row}) {
|
||||||
|
if (row.checked) return "warning-row";
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
checkSelectable(row) {
|
||||||
|
return !row.check;
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.unionQuery.page = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleChange(val) {
|
||||||
|
this.radioCheck = val.id;
|
||||||
|
this.currentRow = val;
|
||||||
|
this.multipleSelection = val
|
||||||
|
},
|
||||||
|
handleDetailClick(row) {
|
||||||
|
this.currentRow = row;
|
||||||
|
this.udiRlDetailVisible = true;
|
||||||
|
|
||||||
|
},
|
||||||
|
handleErpPageChange(val) {
|
||||||
|
this.listQuery.page = val.page;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
keyup_submit(event) {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
event.target.select();
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.listQuery.customerId = store.getters.customerId;
|
||||||
|
filterCompanyProductRelevance(this.listQuery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.dataList = response.data.list || [];
|
||||||
|
this.pageTotal = response.data.total || 0;
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
this.dataList = [];
|
||||||
|
this.pageTotal = 0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.dataList = [];
|
||||||
|
this.pageTotal = 0;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
intentBack() {
|
||||||
|
this.closeDialog();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
confirmSelect() {
|
||||||
|
if (this.multipleSelection == null) {
|
||||||
|
this.$message.error('未选择产品');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.ids.length>0){
|
||||||
|
for(var i=0;i<this.ids.length;i++){
|
||||||
|
if(this.ids[i]==this.multipleSelection.rlId){
|
||||||
|
this.$message.error("该产品已录入!");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let str = this.multipleSelection.zczbhhzbapzbh;
|
||||||
|
if (str.search(",") != -1) {
|
||||||
|
this.currentCert = null;
|
||||||
|
this.certList = str.split(',');
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
} else {
|
||||||
|
this.combine();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
combine() {
|
||||||
|
this.loading = true;
|
||||||
|
let tQuery = {
|
||||||
|
productId:this.multipleSelection.rlId,
|
||||||
|
productName:this.multipleSelection.cpmctymc,
|
||||||
|
count:1,
|
||||||
|
orderIdFk:this.pId,
|
||||||
|
supId:this.multipleSelection.customerId,
|
||||||
|
zczbhhzbapzbh:this.multipleSelection.zczbhhzbapzbh
|
||||||
|
};
|
||||||
|
addOrderDetail(tQuery).then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.closeDialog(response.data);
|
||||||
|
} else {
|
||||||
|
if (response.code == 601) {
|
||||||
|
this.$alert(response.message, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
});
|
||||||
|
} else
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
selectCert() {
|
||||||
|
if (this.currentCert == null) {
|
||||||
|
this.$message.error("请先选择对应的注册证!");
|
||||||
|
}else{
|
||||||
|
this.multipleSelection.zczbhhzbapzbh = this.currentCert;
|
||||||
|
this.combine();
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {udiRlDetailDialog},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
console.log(this.data)
|
||||||
|
if (this.$isNotBlank(this.data)) {
|
||||||
|
this.ids=[];
|
||||||
|
if(this.data.stockOrderLists.length>0){
|
||||||
|
for(var i=0;i<this.data.stockOrderLists.length;i++){
|
||||||
|
this.ids.push(this.data.stockOrderLists[i].productId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
|
||||||
|
div /deep/ .el-table .warning-row {
|
||||||
|
background: #bebebe;
|
||||||
|
}
|
||||||
|
|
||||||
|
div /deep/ .el-table .success-row {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue