Commit 58389af3 authored by renjintao's avatar renjintao

出库配套ing

parent 46e9df6b
......@@ -1599,7 +1599,7 @@ export default {
nowTotal: '剩余数量',
},
support_main: {
creationTime: '创建时间',
creationTime: '申请日期',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
......@@ -1611,10 +1611,15 @@ export default {
drawnNumber: '图号',
count: '订单数量',
creator: '申请人',
status: '状态',
status: '配套状态',
status1: '出库状态',
finishDate: '齐套时间',
orderCode: '订单编号',
code: '申请单号',
materialName:'物料名称',
materialNumber:'物料编号',
remark:'备注',
count1: '申请数量',
},
support_item:{
creationTime:'创建时间',
......
......@@ -294,6 +294,7 @@ export default {
let parms = {
main: {
orderId: this.orderId,
orderCode:this.mesCode,
productName: this.productNames,
drawnNumber: this.drawnNumbers,
count: this.counts,
......
......@@ -420,6 +420,7 @@ export default {
count: this.counts,
creator: this.$store.state.userInfo.userName,
finishDate: this.orderForm.QuotationFinishDate,
orderCode:this.mesCode,
},
items: temItems,
};
......@@ -463,6 +464,7 @@ export default {
count: this.counts,
creator: this.$store.state.userInfo.userName,
finishDate: this.entity.finishDate,
orderCode:this.mesCode,
},
items: temItems,
};
......
<template>
<div class="h100 table-content">
<p class="mb10">
申请单号:{{row.code}}
<span class="ml20">齐套日期:{{row.finishDate.substring(0,10)}}</span>
<span class="ml50">申请人:{{row.creator}}</span>
<span class="ml20">申请时间:{{row.creationTime}}</span>
<span class="ml20">
状态:
<state code="aps.plan.supportingStatus" :value="row.status+''" type="text"></state>
</span>
</p>
<Split v-model="split" mode="vertical">
<div slot="top" class="demo-split-pane" style="background:#fff;height:100%">
<Table
:columns="cols"
:data="datas"
class="tableCommon"
border
highlight-row
@on-current-change="curChange"
:height="tableHeight"
></Table>
</div>
<div slot="bottom" class="demo-split-pane" style="background:#fff;height:100%">
<p class="mt10 mb10">
<Button type="primary">出库</Button>
</p>
<Table
:columns="cols"
:data="datas"
class="tableCommon"
border
highlight-row
@on-current-change="curChange"
:height="tableHeight-40"
></Table>
</div>
</Split>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
split: 0.5,
cols: [
{
key: "materialName",
title: this.l("materialName"),
align: "left",
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
},
{
key: "count",
title: this.l("count1"),
align: "right",
},
{
key: "count",
title: "出库数",
align: "right",
},
{
key: "",
title: "状态",
align: "center",
},
{
key: "remark",
title: this.l("remark"),
align: "left",
},
{
key: "action",
title: "操作",
align: "center",
render: (h, params) => {
return h("op", {}, "配套");
},
},
],
datas: [],
tableHeight: "",
};
},
props: {
eid: Number,
row: Object,
},
mounted() {
this.tableHeight = (window.innerHeight - 150) / 2;
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.tableHeight = (window.screenHeight - 150) / 2;
})();
};
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.getitemlist({ id: v }).then((r) => {
if (r.success) {
let temData = [];
for (let i = 0; i < 10; i++) {
temData = temData.concat(r.result.children);
}
this.datas = temData;
}
});
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
curChange(curRow, oldRow) {
//点击物料行
alert(JSON.stringify(curRow));
},
l(key) {
key = "support_main" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
},
},
};
</script>
<style scoped>
.demo-split-pane {
padding: 10px;
}
</style>
\ No newline at end of file
import Api from '@/plugins/request'
export default {
index: `${technologyUrl}supportmain/paged`,
paged(params) {
return Api.post(`${technologyUrl}supportmain/paged`, params);
},
get(params) {
return Api.get(`${technologyUrl}supportmain/get`, params);
},
create(params) {
return Api.post(`${technologyUrl}supportmain/create`, params);
},
update(params) {
return Api.post(`${technologyUrl}supportmain/update`, params);
},
delete(id) {
return Api.delete(`${technologyUrl}supportmain/delete`, {
params: {
id: id
}
});
},
deletes(params) {
return Api.post(`${technologyUrl}supportmain/batchdelete`, params);
},
getitemlist(params) {//根据id获取单个配套
return Api.get(`${technologyUrl}supportmain/getitemlist`, params);
},
}
<template>
<div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入申请单号或订单编号" v-model="easySearch.keys.value" v-width="240" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" fullscreen footer-hide>
<component :is="detail" :eid="curId" :row="entity" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "list",
components: {},
head: {
title: "配套记录主表",
author: "henq",
description: "support_main 8/8/2020 9:47:54 AM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: { op: "orderCode,code", value: null },
},
modal: false,
title: "新增",
detail: null,
curId: 0,
entity:{},
columns: [
{
key: "code",
title: this.l("code"),
align: "left",
easy: true,
},
{
key: "finishDate",
title: this.l("finishDate"),
align: "center",
type: "date",
},
{
key: "orderCode",
title: this.l("orderCode"),
align: "left",
easy: true,
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "center",
type: "date",
},
{ key: "creator", title: this.l("creator"), align: "left" },
{ key: "status", title: this.l("status"), align: "center" },
{ key: "status1", title: this.l("status1"), align: "center" },
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.getAccessory(params.row) },
},
"配套"
),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.getOutBound(params.row) },
},
"出库单"
),
]);
},
},
],
};
},
mounted() {
this.search();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
getAccessory(row) {
this.curId = row.id;
this.title = "配套";
this.entity=row
this.detail = () => import("./accessory");
this.modal = true;
},
getOutBound(row) {
this.curId = row.id;
this.title = "出库单";
this.detail = () => import("./outbound");
this.modal = true;
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
let vkey = "support_main" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<div>444444</div>
</template>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment