This commit is contained in:
zxx 2023-12-12 11:29:49 +08:00
parent e3b4329138
commit 47837e9615
7 changed files with 693 additions and 410 deletions

View File

@ -1,4 +1,3 @@
import XEUtils from 'xe-utils' // 加载xe-utils
import JSONbig from 'json-bigint'
import guid from './guid' // 加载modal
@ -27,6 +26,19 @@ export default {
return XEUtils.toDateString(cellValue, 'yyyy-MM-dd HH:mm:ss')
},
getDateTime(cellValue) {
this.getDateString(cellValue);
},
getDate(cellValue) {
if (!cellValue) {
return '';
}
if (typeof (cellValue) == "number") {
cellValue = new Date(cellValue * 1000);
}
return XEUtils.toDateString(cellValue, 'yyyy-MM-dd')
},
formatEnum(cellValue, options) { // 格式化状态
if (cellValue == null) return '';
@ -49,7 +61,6 @@ export default {
}
let feachRules = (rules) => {
rules.forEach(rule => { // 循环规则
@ -86,9 +97,6 @@ export default {
}
return data;
},
@ -144,16 +152,14 @@ export default {
if (value == null) {
item[rule.field] = null;
}
else {
} else {
if (!value) {
value = 0;
}
item[rule.field] = parseInt(value);
}
}
else if (rule.type == "number" || rule.type == "float") {
} else if (rule.type == "number" || rule.type == "float") {
if (value == null) {
item[rule.field] = null;
@ -163,8 +169,7 @@ export default {
}
item[rule.field] = parseFloat(value);
}
}
else if (rule.type == "timestamp") {
} else if (rule.type == "timestamp") {
if (value) {
if (typeof (value) == 'string') {
item[rule.field] = parseInt(new Date(value).getTime() / 1000);
@ -172,8 +177,7 @@ export default {
} else {
item[rule.field] = null;
}
}
else if (rule.type == "bigint") {
} else if (rule.type == "bigint") {
if (!item[rule.field]) {
item[rule.field] = null;
} else {
@ -199,7 +203,6 @@ export default {
if (dataId && type !== 'array') {
d = {
insertList: [],
updateList: [],
@ -209,8 +212,7 @@ export default {
list.forEach(item => {
if (item.id) {
d.updateList.push(item);
}
else {
} else {
d.insertList.push(item);
}
});

View File

@ -10,7 +10,8 @@
<template #sort_id="{ }">
<vxe-pulldown style="width:100%" ref="pulldownParent" transfer>
<template #default>
<vxe-input v-model="sortName" suffix-icon="vxe-icon-search" placeholder="选择分类" @keyup="pulldownKeyupEvent"
<vxe-input v-model="sortName" suffix-icon="vxe-icon-search" placeholder="选择分类"
@keyup="pulldownKeyupEvent"
@focus="pulldownFocusEvent" @suffix-click="pulldownSuffixClick"></vxe-input>
</template>
<template #dropdown>
@ -226,7 +227,27 @@ export default {
{field: 'code', title: '编号', span: 12, itemRender: {name: '$input'}},
{field: 'name', title: '名称', span: 12, itemRender: {name: '$input'}},
{title: '分类', span: 12, slots: {default: 'sort_id'}},
{ field: 'price', title: '单价', dataRule: { type: 'number' }, span: 12, itemRender: { name: '$input', props: { type: "number" } } },
{
field: 'price',
title: '单价',
dataRule: {type: 'number'},
span: 12,
itemRender: {name: '$input', props: {type: "number"}}
},
{
field: 'purchase_cost',
title: '采购成本',
dataRule: {type: 'number'},
span: 12,
itemRender: {name: '$input', props: {type: "number"}}
},
{
field: 'processing_cost',
title: '加工成本',
dataRule: {type: 'number'},
span: 12,
itemRender: {name: '$input', props: {type: "number"}}
},
{field: 'size', title: '尺寸', span: 12, itemRender: {name: '$input'}},
{

View File

@ -1,6 +1,53 @@
<template>
<div class="page-body">
<a-divider orientation="left">库位</a-divider>
<a-descriptions title="">
<a-descriptions-item label="库位名称">
{{ warehouse_pos_idetail.name }}
</a-descriptions-item>
<a-descriptions-item label="库位编号">
{{ warehouse_pos_idetail.code }}
</a-descriptions-item>
<a-descriptions-item label="仓库名称">
{{ warehouse_idetail.name }}
</a-descriptions-item>
<a-descriptions-item label="仓库编号">
{{ warehouse_idetail.code }}
</a-descriptions-item>
<a-descriptions-item label="库存数量">
<span style="color: maroon;font-weight: bold;">{{
current_mes_stock_position.stock
}}</span> {{ product_detail.unit }}
</a-descriptions-item>
</a-descriptions>
<a-divider orientation="left">料品信息</a-divider>
<a-descriptions title="">
<a-descriptions-item label="料品名称">
{{ product_detail.name }}
</a-descriptions-item>
<a-descriptions-item label="料品编号">
{{ product_detail.code }}
</a-descriptions-item>
<a-descriptions-item label="规格">
{{ product_detail.spec }}
</a-descriptions-item>
<a-descriptions-item label="尺寸">
{{ product_detail.size }}
</a-descriptions-item>
<a-descriptions-item label="颜色">
{{ product_detail.color }}
</a-descriptions-item>
<a-descriptions-item label="单价">
{{ product_detail.price }}
</a-descriptions-item>
<a-descriptions-item label="备注">
{{ product_detail.remark }}
</a-descriptions-item>
<a-descriptions-item label="总库存">
<span style="color: maroon;font-weight: bold;">{{ mes_stock.stock }}</span> {{ product_detail.unit }}
</a-descriptions-item>
</a-descriptions>
<a-divider orientation="left">新建入库信息</a-divider>
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
</vxe-form>
@ -24,9 +71,9 @@ export default {
type: String,
default: "edit"
},
dataId: {
}
dataId: {},
stockId: {},
pageOptions: {}
},
data() {
@ -56,7 +103,8 @@ export default {
material_id: 0,
warehouse_id: 0,
version: '',
is_default: 0
is_default: 0,
processing_cost: 11,
},
//
titleWidth: 100,
@ -75,10 +123,28 @@ export default {
items: [
{ field: 'stock', dataRule: { type: 'number' }, title: '入库数量', span: 12, itemRender: { name: '$input', props: { type: "number" } } },
{
field: 'stock',
dataRule: {type: 'number'},
title: '入库数量',
span: 12,
itemRender: {name: '$input', props: {type: "number"}}
},
{field: 'in_type', title: '入库类型', span: 12, itemRender: {name: '$input'}},
{ field: 'in_time', dataRule: { type: 'timestamp' }, title: '入库时间', span: 12, itemRender: { name: '$input', props: { type: "date" } } },
{ field: 'bill_date', dataRule: { type: 'timestamp' }, title: '单据日期', span: 12, itemRender: { name: '$input', props: { type: "date" } } },
{
field: 'in_time',
dataRule: {type: 'timestamp'},
title: '入库时间',
span: 12,
itemRender: {name: '$input', props: {type: "date"}}
},
{
field: 'bill_date',
dataRule: {type: 'timestamp'},
title: '单据日期',
span: 12,
itemRender: {name: '$input', props: {type: "date"}}
},
{
title: '入库人', span: 12,
@ -128,24 +194,47 @@ export default {
},
{ field: 'check_time', dataRule: { type: 'timestamp' }, title: '验货时间', span: 12, itemRender: { name: '$input', props: { type: "date" } } },
{
field: 'check_time',
dataRule: {type: 'timestamp'},
title: '验货时间',
span: 12,
itemRender: {name: '$input', props: {type: "date"}}
},
{field: 'delivery_no', title: '发货单号', span: 12, itemRender: {name: '$input'}},
{field: 'contact', title: '联系人', span: 12, itemRender: {name: '$input'}},
{
field: 'purchase_cost',
title: '采购成本',
span: 12,
itemRender: {name: '$input', props: {type: "number"}},
},
{
field: 'processing_cost',
title: '加工成本',
span: 12,
itemRender: {name: '$input', props: {type: "number"}},
},
{field: 'phone', title: '联系电话', span: 12, itemRender: {name: '$input'}},
{field: 'remark', title: '备注', span: 24, itemRender: {name: '$textarea'}},
]
},
//
addModeItems: [
],
addModeItems: [],
mes_stock: {}, //
mes_stock_position: {}, //
current_mes_stock_position: {}, //
stock_in: {}, //
stock_out: {}, //
product_detail: {}, //
warehouse_idetail: {}, //
warehouse_pos_idetail: {}, //
};
@ -166,7 +255,7 @@ export default {
// id
let dataId = this.getDataId();
let dataId = this.getStockId();
// id
if (dataId) {
@ -180,6 +269,26 @@ export default {
console.log(a) //
this.mes_stock = a.data.mes_stock;
console.log(" this.mes_stock:", this.mes_stock)
this.mes_stock_position = a.data.mes_stock_position;
console.log(" this.mes_stock_position:", this.mes_stock_position)
for (let i = 0; i < this.mes_stock_position.length; i++) {
// console.log("this.GetId_BigInt(this.mes_stock_position[i].id).c[1]:", this.GetId_BigInt(this.mes_stock_position[i].id).c[1])
// console.log("this.getDataId_BigInt().c[1]:", this.getDataId_BigInt().c[1])
if (this.GetId_BigInt(this.mes_stock_position[i].id).c[1] === this.getDataId_BigInt().c[1]) {
this.current_mes_stock_position = this.mes_stock_position[i];
}
}
console.log(" this.current_mes_stock_position:", this.current_mes_stock_position)
this.product_detail = a.data.mes_stock.product_detail;
this.warehouse_idetail = this.current_mes_stock_position.warehouse_idetail;
this.warehouse_pos_idetail = this.current_mes_stock_position.warehouse_pos_idetail;
this.stock_in = a.data.stock_in;
this.stock_out = a.data.stock_out;
console.log(" this.warehouse_idetail:", this.warehouse_idetail)
console.log(" this.warehouse_pos_idetail:", this.warehouse_pos_idetail)
}).catch((a) => {
this.$mk.error(a.data.msg);
});
@ -197,14 +306,11 @@ export default {
}
},
//
methods: {
// id
getDataId() {
let dataId = this.dataId;
@ -216,11 +322,36 @@ export default {
}
return dataId;
},
getStockId() {
let stockId = this.pageOptions.stockId;
if (this.$route && this.$route.params && this.$route.params.id) {
stockId = this.$route.params.id;
}
if (!stockId) {
stockId = 0;
}
return stockId;
},
getDataId_BigInt() {
let dataId = this.getDataId();
return this.$mk.toBigInt(dataId);
},
GetId_BigInt(id) {
let dataId = id
if (this.$route && this.$route.params && this.$route.params.id) {
dataId = this.$route.params.id;
}
if (!dataId) {
dataId = 0;
}
return this.$mk.toBigInt(dataId);
},
getStockId_BigInt() {
let stockId = this.getStockId();
return this.$mk.toBigInt(stockId);
},
// materials
//
back() {
@ -229,13 +360,10 @@ export default {
},
//
ok() {
let save = () => {
@ -248,7 +376,6 @@ export default {
postdata.stock_pos_id = this.getDataId_BigInt();
//
this.$mk.post({
url: this.actions.save,
@ -272,7 +399,6 @@ export default {
};
//
this.$mk.validateForm({form: this.$refs.xForm}).then(() => { //
@ -294,9 +420,7 @@ export default {
},
//
watch: {
}
watch: {}
};
</script>

View File

@ -2,7 +2,7 @@
<template>
<div class="page-body">
<a-button type="primary" icon="eye" @click="preView">
<a-button type="primary" v-if="formOptions.data.in_time === 0" icon="eye" @click="preView">
打印预览
</a-button>
<h2> {{ title }}</h2>
@ -41,6 +41,20 @@
{{ formOptions.data.total_price|formatNumber }}
</td>
</tr>
<tr class="table-row-2" v-if="formOptions.data.out_time === 0">
<th class="table-cell">
采购成本
</th>
<td class="table-cell" colspan="3">
{{ formOptions.data.purchase_cost|formatNumber }}
</td>
<th class="table-cell">
加工成本
</th>
<td class="table-cell" colspan="6">
{{ formOptions.data.processing_cost|formatNumber }}
</td>
</tr>
<tr class="table-row-3" v-if="formOptions.data.out_time === 0">
<th class="table-cell">
入库数量
@ -401,6 +415,8 @@ export default {
// { field: 'department_id', title: 'ID', span: 12, itemRender: { name: '$input' } },
{field: 'salesman_uid', title: '业务员ID', span: 12, itemRender: {name: '$input'}},
{field: 'salesman_name', title: '业务员姓名', span: 12, itemRender: {name: '$input'}},
{field: 'purchase_cost', title: '采购成本', span: 12, itemRender: {name: '$input'}},
{field: 'processing_cost', title: '加工成本', span: 12, itemRender: {name: '$input'}},
// { field: 'handler_uid', title: 'ID', span: 12, itemRender: { name: '$input' } },
// { field: 'handler_name', title: '', span: 12, itemRender: { name: '$input' } },
// { field: 'warehouse_keeper_uid', title: 'ID', span: 12, itemRender: { name: '$input' } },
@ -584,8 +600,8 @@ export default {
"spec": this.formOptions.data.product_detail.spec,
"unit": this.formOptions.data.product_detail.unit,
"out_stock": this.formOptions.data.out_stock,
"price": this.formOptions.data.price,
"total_price": this.formOptions.data.total_price,
"price": this.formatNumber(this.formOptions.data.price),
"total_price": this.formatNumber(this.formOptions.data.total_price),
"remark": this.formOptions.data.remark,
}
]
@ -593,6 +609,13 @@ export default {
console.log("this.formOptions.data", this.formOptions.data)
this.$refs.preView.show(hiprintTemplate, this.formOptions.data, width)
},
formatNumber(cellValue) {
if (!cellValue) {
return '';
}
return cellValue.toFixed(2);
},
},

View File

@ -1,6 +1,53 @@
<template>
<div class="page-body">
<a-divider orientation="left">库位</a-divider>
<a-descriptions title="">
<a-descriptions-item label="库位名称">
{{ warehouse_pos_idetail.name }}
</a-descriptions-item>
<a-descriptions-item label="库位编号">
{{ warehouse_pos_idetail.code }}
</a-descriptions-item>
<a-descriptions-item label="仓库名称">
{{ warehouse_idetail.name }}
</a-descriptions-item>
<a-descriptions-item label="仓库编号">
{{ warehouse_idetail.code }}
</a-descriptions-item>
<a-descriptions-item label="库存数量">
<span style="color: maroon;font-weight: bold;">{{
current_mes_stock_position.stock
}}</span> {{ product_detail.unit }}
</a-descriptions-item>
</a-descriptions>
<a-divider orientation="left">料品信息</a-divider>
<a-descriptions title="">
<a-descriptions-item label="料品名称">
{{ product_detail.name }}
</a-descriptions-item>
<a-descriptions-item label="料品编号">
{{ product_detail.code }}
</a-descriptions-item>
<a-descriptions-item label="规格">
{{ product_detail.spec }}
</a-descriptions-item>
<a-descriptions-item label="尺寸">
{{ product_detail.size }}
</a-descriptions-item>
<a-descriptions-item label="颜色">
{{ product_detail.color }}
</a-descriptions-item>
<a-descriptions-item label="单价">
{{ product_detail.price }}
</a-descriptions-item>
<a-descriptions-item label="备注">
{{ product_detail.remark }}
</a-descriptions-item>
<a-descriptions-item label="总库存">
<span style="color: maroon;font-weight: bold;">{{ mes_stock.stock }}</span> {{ product_detail.unit }}
</a-descriptions-item>
</a-descriptions>
<a-divider orientation="left">新建出库信息</a-divider>
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
</vxe-form>
@ -24,7 +71,9 @@ export default {
type: String,
default: "edit"
},
dataId: {}
dataId: {},
stockId: {},
pageOptions: {}
},
@ -166,7 +215,14 @@ export default {
//
addModeItems: [],
mes_stock: {}, //
mes_stock_position: {}, //
current_mes_stock_position: {}, //
stock_in: {}, //
stock_out: {}, //
product_detail: {}, //
warehouse_idetail: {}, //
warehouse_pos_idetail: {}, //
};
@ -187,7 +243,7 @@ export default {
// id
let dataId = this.getDataId();
let dataId = this.getStockId();
// id
if (dataId) {
@ -201,6 +257,25 @@ export default {
console.log(a) //
this.mes_stock = a.data.mes_stock;
console.log(" this.mes_stock:", this.mes_stock)
this.mes_stock_position = a.data.mes_stock_position;
console.log(" this.mes_stock_position:", this.mes_stock_position)
for (let i = 0; i < this.mes_stock_position.length; i++) {
// console.log("this.GetId_BigInt(this.mes_stock_position[i].id).c[1]:", this.GetId_BigInt(this.mes_stock_position[i].id).c[1])
// console.log("this.getDataId_BigInt().c[1]:", this.getDataId_BigInt().c[1])
if (this.GetId_BigInt(this.mes_stock_position[i].id).c[1] === this.getDataId_BigInt().c[1]) {
this.current_mes_stock_position = this.mes_stock_position[i];
}
}
console.log(" this.current_mes_stock_position:", this.current_mes_stock_position)
this.product_detail = a.data.mes_stock.product_detail;
this.warehouse_idetail = this.current_mes_stock_position.warehouse_idetail;
this.warehouse_pos_idetail = this.current_mes_stock_position.warehouse_pos_idetail;
this.stock_in = a.data.stock_in;
console.log(" this.stock_in:", this.stock_in)
this.stock_out = a.data.stock_out;
console.log(" this.stock_out:", this.stock_out)
}).catch((a) => {
this.$mk.error(a.data.msg);
});
@ -240,6 +315,31 @@ export default {
},
getStockId() {
let stockId = this.pageOptions.stockId;
if (this.$route && this.$route.params && this.$route.params.id) {
stockId = this.$route.params.id;
}
if (!stockId) {
stockId = 0;
}
return stockId;
},
GetId_BigInt(id) {
let dataId = id
if (this.$route && this.$route.params && this.$route.params.id) {
dataId = this.$route.params.id;
}
if (!dataId) {
dataId = 0;
}
return this.$mk.toBigInt(dataId);
},
getStockId_BigInt() {
let stockId = this.getStockId();
return this.$mk.toBigInt(stockId);
},
//
back() {

View File

@ -4,8 +4,9 @@
<basic-page-list :desc="desc" :options="pageOptions" ref="List">
<template v-slot:column1="{ row }">
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
<a-button class="out" @click="stockOut(row.id)">出库</a-button>
<a-button class="in" type="primary" @click="stockIn(row.id,row.stock_id)">入库</a-button>
<a-button class="out" @click="stockOut(row.id,row.stock_id)">出库</a-button>
</template>
<template v-slot:column2="{ row }">
@ -216,7 +217,7 @@ export default {
},
//
stockOut(id) {
stockOut(id, stockId) {
//console.log("stockOut:"+id)
//this.$router.push('/MesStock/MesStockOut/'+id) //
@ -224,7 +225,9 @@ export default {
this.$mk.dialog.open({
page: () => import("../OutIn/OutEdit"),
title: "出库",
pageOptions: {},
pageOptions: {
stockId: stockId,
},
width: 1000,
height: 800,
dataId: id,
@ -239,7 +242,7 @@ export default {
},
//
stockIn(id) {
stockIn(id, stockId) {
//console.log("stockIn:"+id)
//this.$router.push('/MesStock/MesStockIn/'+id) //
@ -247,10 +250,13 @@ export default {
this.$mk.dialog.open({
page: () => import("../OutIn/InEdit"),
title: "入库",
pageOptions: {},
pageOptions: {
stockId: stockId,
},
width: 1000,
height: 800,
dataId: id,
callback: ({success}) => {
if (success) {
this.$refs.List.gridReload()

View File

@ -3,20 +3,25 @@
<vxe-table border show-overflow keep-source ref="xTable" :data="detailsData" @pulldownSelected="onPulldownSelected"
@popupSelected="onPopupSelected" :export-config="{}" @edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
@popupSelected="onPopupSelected" :export-config="{}" @edit-closed="afterEditEvent"
@edit-actived="beforeEditEvent"
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
<vxe-column title="图片" width="110" align="center">
<vxe-column title="图片" width="80" align="center">
<template #default="{ row }">
<div v-if="row.component_img" style="position: relative;" class="imgbox">
<img style="width:50px;height:50px;" :src="row.component_img"
@click.stop="$hevueImgPreview(row.component_img)"/>
<div class="imgicons" style="position:absolute;right:0px;top:0px;">
<div>
<a @click="imgDel({ row })"> <a-icon type="close-circle" /></a>
<a @click="imgDel({ row })">
<a-icon type="close-circle"/>
</a>
</div>
<div>
<a-upload name="file" accept="image/*" :before-upload="beforeUpload" :show-upload-list="false">
<a @click="uploadClick({ row })"> <a-icon type="edit" /></a>
<a @click="uploadClick({ row })">
<a-icon type="edit"/>
</a>
</a-upload>
</div>
</div>
@ -32,7 +37,7 @@
</template>
</vxe-column>
<vxe-column field="component_num" title="数量" width="80" align="center"
<vxe-column field="component_num" title="数量" width="70" align="center"
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
<vxe-column field="production_type" title="布产类型" width="100" align="center" :edit-render="{}">
<template #default="{ row }">
@ -56,34 +61,42 @@
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
<vxe-column title="完成" width="160" align="center" v-if="getDataId()">
<vxe-column title="完成" width="100" align="center" v-if="getDataId()">
<template #default="{ row }">
<div v-if="row.id">
<div v-if="row.complete_time">{{ $mk.getDateString(row.complete_time) }}</div>
<div v-if="row.complete_time">
<a-tooltip placement="topLeft" :title="'完成时间:'+$mk.getDateString(row.complete_time)"
arrow-point-at-center>
{{ $mk.getDate(row.complete_time) }}
</a-tooltip>
</div>
<a-button v-else :disabled="!(isComponentOutProduct() || pageIsComplete())" @click.stop="pageComplete(row)"
type="primary">完成</a-button>
type="primary">完成
</a-button>
</div>
</template>
</vxe-column>
<!-- <vxe-column field="complete_type" v-if="getDataId() && isDetails1Complete()" title="完工人员类型" width="160"
:params="{ data: options_user_type }" formatter='formatEnum'></vxe-column> -->
<vxe-column field="spec" title="规格" align="center" width="160"
<vxe-column field="spec" title="规格" align="center" width="140"
:edit-render="{ name: '$input', props: {} }"></vxe-column>
<vxe-column field="surface" title="表面工艺" align="center" width="160"
<vxe-column field="surface" title="表面工艺" align="center" width="140"
:edit-render="{ name: '$input', props: {} }"></vxe-column>
<vxe-column field="inlay" title="镶件材料" align="center" width="160"
<vxe-column field="inlay" title="镶件材料" align="center" width="140"
:edit-render="{ name: '$input', props: {} }"></vxe-column>
<vxe-column field="purchase_cost" title="采购成本" align="center" width="auto"
:edit-render="{ name: '$input', props: {type: 'number' } }"></vxe-column>
<vxe-column field="processing_cost" title="加工成本" align="center" width="auto"
:edit-render="{ name: '$input', props: {type: 'number' } }"></vxe-column>
<vxe-column field="remark" title="备注" align="center" width="auto"
:edit-render="{ name: '$input', props: {} }"></vxe-column>
</vxe-table>
<vxe-table v-if="!isComponentOutProduct()" border show-overflow keep-source ref="xTable2" :data="detailsData2"
@ -106,15 +119,14 @@
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
<vxe-column field="department_detail" title="部门" width="120" :params="editor_department" formatter="formatRef"
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
<vxe-column field="progress" title="进度" width="160" :cellRender="{ name: 'progress' }"></vxe-column>
<vxe-column field="progress" title="进度" width="120" :cellRender="{ name: 'progress' }"></vxe-column>
<vxe-column v-if="false" field="process_uid_detail" title="加工人员" width="160" :params="editor_process_uid"
formatter="formatRef" :edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
<vxe-column field="progress" v-if="isEdit" :cellRender="{ name: 'progress' }" title="进度" width="180"></vxe-column>
<vxe-column field="progress" v-if="isEdit" :cellRender="{ name: 'progress' }" title="进度"
width="100"></vxe-column>
<vxe-column field="prepare_process_time" title="预备加工日期" width="130" formatter="formatDate" align="center"
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
@ -122,26 +134,33 @@
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
<vxe-column title="发料" width="210" v-if="getDataId()">
<vxe-column title="发料" width="100" align="center" v-if="getDataId()">
<template #default="{ row }">
<div v-if="row.id">
<a-button v-if="!row.is_send" @click.stop="pageSend(row)" type="primary">发料</a-button>
<div v-if="row.is_send">
{{ $mk.getDateString(row.send_time) }}
<a-button v-if="!isComponentDone() && !row.is_complete" @click.stop="pageSend(row, true)">撤销</a-button>
<a-tooltip placement="topLeft" :title="'发料时间:'+$mk.getDateString(row.send_time)"
arrow-point-at-center>
<a-button v-if="!isComponentDone() && !row.is_complete" @click.stop="pageSend(row, true)">撤销
</a-button>
</a-tooltip>
</div>
</div>
</template>
</vxe-column>
<vxe-column title="完成" width="210" v-if="getDataId()">
<vxe-column title="完成" width="100" align="center" v-if="getDataId()">
<template #default="{ row }">
<div v-if="row.id && row.is_send">
<a-tooltip placement="topLeft" :title="'发料时间:'+$mk.getDateString(row.send_time)" arrow-point-at-center>
<a-button v-if="!row.is_complete" @click.stop="pageDone(row)" type="primary">完成</a-button>
</a-tooltip>
<div v-if="row.is_complete">
{{ $mk.getDateString(row.complete_time) }}
<a-tooltip placement="topLeft" :title="'完成时间:'+$mk.getDateString(row.complete_time)"
arrow-point-at-center>
<a-button v-if="!isComponentDone()" @click.stop="pageDone(row, true)">撤销</a-button>
</a-tooltip>
</div>
</div>
</template>
@ -153,15 +172,17 @@
<vxe-column field="complete_type" v-if="getDataId() && readonly" title="完工人员" width="80" align="center"
:params="{ data: options_user_type }" formatter='formatEnum'></vxe-column>
<vxe-column field="purchase_cost" title="采购成本(元)" width="130"
:edit-render="{ name: '$input', props: {type: 'number' } }"></vxe-column>
<vxe-column field="processing_cost" title="加工成本(元)" width="130"
:edit-render="{ name: '$input', props: {type: 'number' } }"></vxe-column>
<vxe-column field="remark" title="备注" width="auto" :edit-render="{ name: '$input', props: {} }"></vxe-column>
</vxe-table>
</div>
</template>
@ -187,8 +208,7 @@ export default {
itemData: {
type: Object
},
dataId: {
}
dataId: {}
},
@ -228,24 +248,15 @@ export default {
isEdit: false,
//
addModeItems: [
],
addModeItems: [],
detailsSourceData: [
],
detailsData: [
],
deletedDetailsData: [
detailsSourceData: [],
detailsData: [],
deletedDetailsData: [],
],
detailsData2: [
],
deletedDetailsData2: [
],
detailsData2: [],
deletedDetailsData2: [],
editor_component: {
dataType: "object",
valueField: "id",
@ -346,9 +357,6 @@ export default {
this.detailsData2 = JSON.parse(JSON.stringify(this.itemData.mold_production_order_component_processes || []));
//this.loadDepartment();
this.detailsDataInit();
@ -394,7 +402,6 @@ export default {
this.detailsData2[i].department_detail = row.department_detail;
}
}
});
@ -432,7 +439,6 @@ export default {
},
getDateValue(v) {
return new Date(v * 1000);
},
@ -531,9 +537,7 @@ export default {
pageAdd(row) {
const $table = this.$refs.xTable
const record = {
}
const record = {}
if (row) {
this.detailsData = JSON.parse(JSON.stringify(this.detailsData))
this.detailsData.splice($table.getRowSeq(row), 0, record);
@ -592,7 +596,9 @@ export default {
})
postdata.mold_production_order_component = this.$mk.getPostFieldValue({
rowFilter: (row) => { return row.id || row.component_id },
rowFilter: (row) => {
return row.id || row.component_id
},
dataId: this.getDataId_BigInt(),
list: this.detailsData,
deletedList: this.deletedDetailsData,
@ -613,6 +619,8 @@ export default {
{field: 'process_uid', type: 'bigint'},
{field: 'send_uid', type: 'bigint'},
{field: 'process_id', type: 'bigint'},
{field: 'purchase_cost', type: 'bigint'},
{field: 'processing_cost', type: 'bigint'},
]
});
@ -630,7 +638,9 @@ export default {
item.component_id = this.detailsData[0].component_id;
})
postdata.mold_production_order_component_processes = this.$mk.getPostFieldValue({
rowFilter: (row) => { return row.id || (row.component_id && row.process_id) },
rowFilter: (row) => {
return row.id || (row.component_id && row.process_id)
},
dataId: this.getDataId_BigInt(),
list: list,
deletedList: this.deletedDetailsData2,
@ -651,12 +661,13 @@ export default {
{field: 'department_id', type: 'bigint'},
{field: 'process_id', type: 'bigint'},
{field: 'process_uid', type: 'bigint'},
{field: 'purchase_cost', type: 'bigint'},
{field: 'processing_cost', type: 'bigint'},
]
});
}
this.itemData.postdata = postdata;
},
@ -727,16 +738,13 @@ export default {
},
uploadClick({row}) {
this.currentRow = row;
}
},
//
watch: {
}
watch: {}
};
</script>
@ -782,8 +790,7 @@ export default {
}
.imgicons {
display: none;
;
display: none;;
}
.imgbox:hover .imgicons {