20241116更新

main
lcode 1 week ago
parent 53835d3c98
commit 7a20f97b92

@ -70,7 +70,6 @@
<script> <script>
import module from "./module"; import module from "./module";
import config from "@/config";
import savePage from "./savePage"; import savePage from "./savePage";
export default { export default {

@ -116,7 +116,6 @@
</template> </template>
<script> <script>
import useTabs from "@/utils/useTabs";
import selectPage from "./selectPage"; import selectPage from "./selectPage";
import module from "./module"; import module from "./module";
@ -304,12 +303,6 @@ export default {
} }
}, },
back() { back() {
// useTabs.closeNext((tags) => {
// //'/usercenter'
// console.log(tags);
// this.$router.push(this.path);
// this.$route.is = true;
// });
this.visible = false; this.visible = false;
}, },
save() { save() {

@ -91,8 +91,6 @@
</template> </template>
<script> <script>
import useTabs from "@/utils/useTabs";
import module from "./module"; import module from "./module";
export default { export default {
@ -304,12 +302,6 @@ export default {
this.detailListData = [...data, ...this.detailListData]; this.detailListData = [...data, ...this.detailListData];
}, },
back() { back() {
// useTabs.closeNext((tags) => {
// //'/usercenter'
// console.log(tags);
// this.$router.push(this.path);
// this.$route.is = true;
// });
this.visible = false; this.visible = false;
}, },
save() { save() {

@ -4,6 +4,7 @@
v-model="visible" v-model="visible"
:width="panelWidth" :width="panelWidth"
destroy-on-close destroy-on-close
:append-to-body="true"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<el-container> <el-container>
@ -32,11 +33,7 @@
clearable clearable
> >
</el-input> </el-input>
<el-input <el-input v-model="search.orderNo" placeholder="订单号" clearable>
v-model="search.orderNo"
placeholder="订单号"
clearable
>
</el-input> </el-input>
<el-input <el-input
v-model="search.customerName" v-model="search.customerName"
@ -50,11 +47,7 @@
icon="el-icon-search" icon="el-icon-search"
@click="upsearch" @click="upsearch"
></el-button> ></el-button>
<el-button <el-button type="primary" plain @click="add"></el-button>
type="primary"
plain
@click="add"
>添加</el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
@ -66,7 +59,10 @@
row-key="id" row-key="id"
@selection-change="selectionChange" @selection-change="selectionChange"
> >
<el-table-column type="selection" width="50" :reserve-selection="true" <el-table-column
type="selection"
width="50"
:reserve-selection="true"
:selectable="selectable" :selectable="selectable"
></el-table-column> ></el-table-column>
</scTable> </scTable>
@ -100,14 +96,15 @@ export default {
params: module.tableSelect.params, params: module.tableSelect.params,
selection: [], selection: [],
materialCategoryItem: { materialCategoryItem: {
options: { tb: 'product_material_categories', placeholder: '物料/产品分类' } options: {
tb: "product_material_categories",
placeholder: "物料/产品分类",
},
}, },
listData: [] listData: [],
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
// //
open() { open() {
@ -117,26 +114,28 @@ export default {
materialName: "", materialName: "",
productCode: "", productCode: "",
profileModel: "", profileModel: "",
} };
this.$forceUpdate(); this.$forceUpdate();
this.visible = true; this.visible = true;
return this; return this;
}, },
setData(listData) { setData(listData) {
console.log("listData", listData) console.log("listData", listData);
console.log(typeof listData) console.log(typeof listData);
this.listData = listData; this.listData = listData;
}, },
selectable(row, index) { selectable(row, index) {
console.log("this.listData", this.listData) console.log("this.listData", this.listData);
return !this.listData.some(item => row.documentNumber == item.documentNumber) return !this.listData.some(
(item) => row.documentNumber == item.documentNumber
);
}, },
// //
selectionChange(selection) { selectionChange(selection) {
this.selection = selection; this.selection = selection;
}, },
add() { add() {
this.$emit("success", this.selection) this.$emit("success", this.selection);
this.visible = false; this.visible = false;
}, },
// //
@ -147,5 +146,5 @@ export default {
}; };
</script> </script>
<style> <style lang="less" scoped>
</style> </style>

@ -117,19 +117,19 @@ export default {
"title": "选计划排产订单", "title": "选计划排产订单",
"panelWidth": "1000px", "panelWidth": "1000px",
"api": "productionSchedule.list", "api": "productionSchedule.list",
"params": { "status": 1 }, "params": { "status": 1, "orderStatus": 1 },
"column": [ "column": [
{ label: "", prop: "id", width: "200", hide: true }, { label: "", prop: "id", width: "200", hide: true },
{ label: "计划单号", prop: "documentNumber", width: "200" }, { label: "计划单号", prop: "documentNumber", width: "200" },
{ label: "销售单号", prop: "salesOrderCode", width: "200" }, { label: "销售单号", prop: "salesOrderCode", width: "200" },
{ "label": "客户名称", "prop": "customerName", "width": "200" }, { label: "客户名称", prop: "customerName", width: "200" },
{ {
label: "销售日期", label: "销售日期",
prop: "salesDate", prop: "salesDate",
width: "200", width: "200",
}, },
{ "label": "销售员", "prop": "salespersonName", "width": "200" }, { label: "销售员", prop: "salespersonName", width: "200" },
{ "label": "价格", "prop": "price", "width": "200" }, { label: "价格", prop: "price", width: "200" },
{ {
label: "定价日期", label: "定价日期",
prop: "pricingDate", prop: "pricingDate",
@ -140,9 +140,10 @@ export default {
prop: "deliveryDate", prop: "deliveryDate",
width: "200", width: "200",
}, },
{ "label": "税率", "prop": "taxRate", "width": "200" }, { label: "税率", prop: "taxRate", width: "200" },
{ "label": "加工费", "prop": "processingFee", "width": "200" }, { label: "加工费", prop: "processingFee", width: "200" },
{ "label": "备注", "prop": "remarks", "width": "200" }, { label: "备注", prop: "remarks", width: "200" },
{ label: "订单号", prop: "orderNo", width: "200" },
{ label: "物料编号", prop: "materialCode", width: "200" }, { label: "物料编号", prop: "materialCode", width: "200" },
{ label: "型材型号", prop: "profileModel", width: "200" }, { label: "型材型号", prop: "profileModel", width: "200" },
{ label: "物料名称", prop: "materialName", width: "200" }, { label: "物料名称", prop: "materialName", width: "200" },
@ -150,7 +151,6 @@ export default {
{ label: "壁厚", prop: "thickness", width: "200" }, { label: "壁厚", prop: "thickness", width: "200" },
{ label: "米重 (kg/m)", prop: "weight", width: "200" }, { label: "米重 (kg/m)", prop: "weight", width: "200" },
{ label: "支/扎", prop: "piecesBundle", width: "200" }, { label: "支/扎", prop: "piecesBundle", width: "200" },
{ label: "物料/产品分类", prop: "materialCategoryName", width: "200" },
{ label: "包装方式", prop: "packagingMethod", width: "200" }, { label: "包装方式", prop: "packagingMethod", width: "200" },
], ],
}, },

@ -80,7 +80,6 @@
v-model="scoped.row.productionPieces" v-model="scoped.row.productionPieces"
:step="1" :step="1"
:min="1" :min="1"
:max="Number(scoped.row.plannedPieces) - Number(scoped.row.productionedPieces)"
:precision="0" :precision="0"
:controls="true" :controls="true"
@ -138,14 +137,12 @@ export default {
selection: [], selection: [],
dialog: { dialog: {
product: false, product: false,
selectPage: false,
}, },
supplier: {}, supplier: {},
path: this.$route.query.path, path: this.$route.query.path,
detailId: this.$route.query.id, detailId: this.$route.query.id,
mode: "add", mode: "add",
dialog: {
selectPage: false,
},
visible: false, visible: false,
orderInfo: {} orderInfo: {}
}; };
@ -175,6 +172,7 @@ export default {
handler(newVal) { handler(newVal) {
if (!newVal) return; if (!newVal) return;
newVal.forEach((item) => { newVal.forEach((item) => {
/* 支数 */ /* 支数 */
item["pieces"] = parseFloat( item["pieces"] = parseFloat(
Number(item["piecesBundle"]) * Number(item["returnQuantity"]) Number(item["piecesBundle"]) * Number(item["returnQuantity"])
@ -193,8 +191,8 @@ export default {
item["theoreticalWeight"] = parseFloat( item["theoreticalWeight"] = parseFloat(
( (
Number(item["weight"]) * Number(item["weight"]) *
Number(item["defaultLength"]) * Number(item["orderLength"]) *
Number(item["returnQuantity"]) Number(item["plannedPieces"])
).toFixed(2) ).toFixed(2)
); );
@ -250,7 +248,7 @@ export default {
this.listData = this.listData.filter( this.listData = this.listData.filter(
(item1) => (item1) =>
!this.selection.some( !this.selection.some(
(item2) => item2.materialCode === item1.materialCode (item2) => item2.orderNo === item1.orderNo
) )
); );
this.selection = []; this.selection = [];
@ -265,8 +263,11 @@ export default {
item[key] = _this.initComputed[key]; item[key] = _this.initComputed[key];
} }
} }
item["productionLength"] = item["orderLength"]
item["productionPieces"] = item["plannedPieces"]
}); });
console.log("2", this, this.listData)
this.listData = [...data]; this.listData = [...data];
}, },
async queryInventoryQuantity(row) { async queryInventoryQuantity(row) {

@ -37,8 +37,7 @@
<script> <script>
import saveDialog from './save' import saveDialog from './save'
import module from './module' import module from './module'
import config from "@/config" import savePage from './savePage'
import savePage from './savePage'
export default { export default {
components: { components: {

@ -107,8 +107,6 @@
</template> </template>
<script> <script>
import useTabs from "@/utils/useTabs";
import module from "./module"; import module from "./module";
import materialsSelect from "./materialsSelect"; import materialsSelect from "./materialsSelect";
@ -315,12 +313,6 @@ export default {
} }
}, },
back() { back() {
// useTabs.closeNext((tags) => {
// //'/usercenter'
// console.log(tags);
// this.$router.push(this.path);
// this.$route.is = true;
// });
this.visible = false; this.visible = false;
}, },
save() { save() {

@ -37,8 +37,7 @@
<script> <script>
import saveDialog from './save' import saveDialog from './save'
import module from './module' import module from './module'
import config from "@/config" import savePage from './savePage'
import savePage from './savePage'
export default { export default {
components: { components: {

@ -102,8 +102,6 @@
</template> </template>
<script> <script>
import useTabs from "@/utils/useTabs";
import module from "./module"; import module from "./module";
import materialsSelect from "./materialsSelect"; import materialsSelect from "./materialsSelect";
@ -213,12 +211,6 @@ export default {
}, },
created() {}, created() {},
mounted() { mounted() {
//tab
// this.$store.commit(
// "updateViewTagsTitle",
// this.id ? `CURDID:${this.id}` : "CURD"
// );
// this.loadDetail();
}, },
methods: { methods: {
open(mode="add") { open(mode="add") {
@ -289,12 +281,6 @@ export default {
} }
}, },
back() { back() {
// useTabs.closeNext((tags) => {
// //'/usercenter'
// console.log(tags);
// this.$router.push(this.path);
// this.$route.is = true;
// });
this.visible = false; this.visible = false;
}, },
save() { save() {

@ -79,6 +79,7 @@
v-model="scoped.row.receiptQuantity" v-model="scoped.row.receiptQuantity"
:step="1" :step="1"
:min="1" :min="1"
:max="scoped.row.productionNumber - scoped.row.stockQuantity"
:precision="0" :precision="0"
:controls="true" :controls="true"
v-if="mode=='add'" v-if="mode=='add'"
@ -293,6 +294,7 @@ export default {
item[key] = _this.initComputed[key]; item[key] = _this.initComputed[key];
} }
} }
item['receiptQuantity'] = item['productionNumber']
}); });
this.listData = [...data, ...this.listData]; this.listData = [...data, ...this.listData];
}, },

@ -6,6 +6,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="page_add" @click="page_add"
v-if="isFirst"
></el-button> ></el-button>
</div> </div>
<div class="right-panel-search"> <div class="right-panel-search">
@ -57,6 +58,7 @@
:apiObj="apiObj" :apiObj="apiObj"
:column="column" :column="column"
:remoteFilter="config.remoteFilter" :remoteFilter="config.remoteFilter"
:params="params"
row-key="" row-key=""
@selection-change="selectionChange" @selection-change="selectionChange"
> >
@ -81,7 +83,7 @@
type="text" type="text"
size="medium" size="medium"
@click="table_edit(scope.row, scope.$index)" @click="table_edit(scope.row, scope.$index)"
v-if="config.option.edit && scope.row.isCompleted != '1'" v-if="config.option.edit && scope.row.isCompleted != '1' && (!scope.row.nextProcess)"
>完成</el-button >完成</el-button
> >
</template> </template>
@ -112,7 +114,6 @@
<script> <script>
import saveDialog from "./save"; import saveDialog from "./save";
import module from "./module"; import module from "./module";
import config from "@/config";
import savePage from "./savePage"; import savePage from "./savePage";
import infoDialog from "./info"; import infoDialog from "./info";
@ -126,6 +127,11 @@ export default {
dicselect, dicselect,
}, },
data() { data() {
let currentProcess = "";
if (this.$route.path.startsWith("/processReport/")) {
currentProcess = this.$route.path.replace("/processReport/", "");
}
return { return {
dialog: { dialog: {
save: false, save: false,
@ -140,7 +146,10 @@ export default {
reportNumber: "", reportNumber: "",
date: "", date: "",
}, },
params: {
currentProcess: currentProcess
},
isFirst: currentProcess == 'jiya',
apiObj: this.$API[module.name][module.list], apiObj: this.$API[module.name][module.list],
selection: [], selection: [],
config: module.config, config: module.config,
@ -148,10 +157,19 @@ export default {
column: module.column, column: module.column,
currentProcessItem: { currentProcessItem: {
options: { group: "working", placeholder: "当前工序" }, options: { group: "working", placeholder: "当前工序" },
} },
}; };
}, },
mounted() {}, watch: {
params: {
handler() {
this.$refs.table.upData()
},
deep: true
}
},
created() {
},
methods: { methods: {
// //
importExcel() { importExcel() {

@ -1,13 +1,21 @@
<template> <template>
<el-dialog <el-dialog
title="查看" title="查看"
v-model="visible" v-model="visible"
:width="panelWidth" :width="panelWidth"
destroy-on-close destroy-on-close
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<ex-desc v-model="descData" :descProps="descProps" :descInfo="descInfo"> <ex-desc v-model="descData" :descProps="descProps" :descInfo="descInfo">
<template #actualWeight="{ item }">
<span>{{ dealData("actualWeight") }}</span>
</template>
<template #scrapWeight="{ item }">
<span>{{ dealData("scrapWeight") }}</span>
</template>
<template #theoreticalWeight="{ item }">
<span>{{ dealData("theoreticalWeight") }}</span>
</template>
</ex-desc> </ex-desc>
</el-dialog> </el-dialog>
</template> </template>
@ -19,7 +27,7 @@ export default {
data() { data() {
return { return {
mode: "add", mode: "add",
panelWidth:module.infoOption.panelWidth || "500", panelWidth: module.infoOption.panelWidth || "500",
visible: false, visible: false,
isSaveing: false, isSaveing: false,
loading: false, loading: false,
@ -30,8 +38,7 @@ export default {
descData: {}, descData: {},
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
// //
open() { open() {
@ -41,7 +48,31 @@ export default {
// //
setData(data) { setData(data) {
// //
Object.assign(this.descData, data) Object.assign(this.descData, data);
},
dealData(key) {
switch (key) {
case "actualWeight":
return (
Number(this.descData["productionWeight"]) *
Number(this.descData["productionLength"]) *
Number(this.descData["productionNumber"])
);
case "scrapWeight":
return (
Number(this.descData["productionWeight"]) *
Number(this.descData["productionLength"]) *
Number(this.descData["scrapNumber"])
);
case "theoreticalWeight":
return (
Number(this.descData["weight"]) *
Number(this.descData["productionLength"]) *
Number(this.descData["productionNumber"])
);
default:
return "";
}
}, },
}, },
}; };

@ -1,6 +1,3 @@
import $API from '@/api'
import $CONFIG from '@/config'
export default { export default {
name: "processReport", name: "processReport",
dec: "工序报工", dec: "工序报工",
@ -32,7 +29,19 @@ export default {
{ label: "机台", prop: "machine", width: "200" }, { label: "机台", prop: "machine", width: "200" },
{ label: "销售订单编码", prop: "salesOrderCode", width: "200" }, { label: "销售订单编码", prop: "salesOrderCode", width: "200" },
{ label: "挤压排产编码", prop: "scheduleNumber", width: "200" }, { label: "挤压排产编码", prop: "scheduleNumber", width: "200" },
{ label: "产品代码", prop: "materialCode", width: "200" },
{ label: "型材型号", prop: "profileModel", width: "200" }, { label: "型材型号", prop: "profileModel", width: "200" },
{ label: "物料名称", prop: "materialName", width: "200" },
{ label: "规格型号", prop: "specification", width: "200" },
{ label: "壁厚", prop: "thickness", width: "200" },
{ label: "米重", prop: "weight", width: "200" },
{ label: "订单长度M", prop: "orderLength", width: "200" },
{ label: "表面方式", prop: "surfaceMethod", width: "200" },
{ label: "订单总数", prop: "orderTotalQuantity", width: "200" },
{ label: "排产长度(m)", prop: "productionLength", width: "200" },
{ label: "排产支数", prop: "productionPieces", width: "200" },
{ label: "锯切方式", prop: "sawingMethod", width: "200" },
{ label: "交货日期", prop: "deliveryDate", width: "200" },
{ label: "操作员", prop: "operator", width: "200" }, { label: "操作员", prop: "operator", width: "200" },
{ label: "车间", prop: "workshop", width: "200" }, { label: "车间", prop: "workshop", width: "200" },
{ {
@ -57,24 +66,64 @@ export default {
}, },
items: [ items: [
{ {
label: "完成数量", name: "productionNumber", value: "", component: "", span: 1, label: "来料支数", name: "sourceNumber", value: "", component: "", span: 1,
hideHandle: "$.currentProcess == 'jiya'"
},
{
label: "实收支数", name: "netReceipts", value: "", component: "", span: 1,
hideHandle: "$.currentProcess == 'jiya'"
},
{
label: "生产支数", name: "productionNumber", value: "", component: "", span: 1,
}, },
{ {
label: "完成重量", name: "productionWeight", value: "", component: "ther", span: 1, label: "实际米重", name: "productionWeight", value: "", component: "", span: 1,
},
{
label: "实际总重量(KG)", name: "actualWeight", value: "", component: "other", span: 1,
}, },
{ label: "报废支数", name: "scrapNumber", value: "", component: "", span: 1 }, { label: "报废支数", name: "scrapNumber", value: "", component: "", span: 1 },
{
label: "报废重量(KG)", name: "scrapWeight", value: "", component: "other", span: 1,
},
{ label: "报废原因", name: "scrapReason", value: "", component: "", span: 1 }, { label: "报废原因", name: "scrapReason", value: "", component: "", span: 1 },
{
label: "理论重量(KG)", name: "theoreticalWeight", value: "", component: "other", span: 1,
},
{ label: "框号", name: "frameNumber", value: "", component: "", span: 1 }, { label: "框号", name: "frameNumber", value: "", component: "", span: 1 },
{ label: "模具编码", name: "moldCode", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ label: "模具型号", name: "moldModel", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ label: "模厚", name: "moldThickness", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ label: "模具厂家", name: "moldManufacturer", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ label: "颜色", name: "moldColor", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ label: "换模原因", name: "moldChangeReason", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ label: "用棒支数", name: "rodCount", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'jiya' && $.currentProcess != 'jingpin'"
},
{ {
label: "当前工序", name: "currentProcess", value: "", component: "dic", group: "working", span: 1, label: "当前工序", name: "currentProcess", value: "", component: "dic", group: "working", span: 1,
}, },
{ {
label: "下一工序", name: "nextProcess", value: "", component: "dic", group: "working", span: 1, label: "下一工序", name: "nextProcess", value: "", component: "dic", group: "working", span: 1,
hideHandle: "$.currentProcess == 'bz'" hideHandle: "$.isCompleted == true"
}, },
{ {
label: "是否完成", name: "isCompleted", value: "", component: "", span: 1, label: "是否完成", name: "isCompleted", value: "", component: "", span: 1,
hideHandle: "$.currentProcess != 'bz'", // hideHandle: "$.currentProcess != 'bz'",
format(value) { format(value) {
switch (value + "") { switch (value + "") {
case "1": case "1":
@ -96,14 +145,20 @@ export default {
size: 'medium', size: 'medium',
formItems: [ formItems: [
{ {
label: "完成数量", name: "productionNumber", value: "", component: "other", span: 24, label: "实收支数", name: "netReceipts", value: "", component: "other", span: 24,
options: { maxlength: "256", placeholder: "请输入完成数量" }, options: { maxlength: "256", placeholder: "请输入实收支数" },
rules: [{ required: true, message: "请输入完成数量", trigger: "blur" }] rules: [{ required: true, message: "请输入实收支数", trigger: "blur" }],
hideHandle: "$.currentProcess == 'jiya'"
},
{
label: "生产支数", name: "productionNumber", value: "", component: "other", span: 24,
options: { maxlength: "256", placeholder: "请输入生产支数" },
rules: [{ required: true, message: "请输入生产支数", trigger: "blur" }]
}, },
{ {
label: "完成重量", name: "productionWeight", value: "", component: "other", span: 24, label: "实际米重", name: "productionWeight", value: "", component: "other", span: 24,
options: { maxlength: "256", placeholder: "请输入完成重量" }, options: { maxlength: "256", placeholder: "请输入实际米重" },
rules: [{ required: true, message: "请输入完成重量", trigger: "blur" }] rules: [{ required: true, message: "请输入实际米重", trigger: "blur" }]
}, },
{ label: "报废支数", name: "scrapNumber", value: "", component: "other", span: 24, options: { maxlength: "256", placeholder: "请输入报废支数" }, rules: [{ required: false, message: "请输入报废支数", trigger: "blur" }] }, { label: "报废支数", name: "scrapNumber", value: "", component: "other", span: 24, options: { maxlength: "256", placeholder: "请输入报废支数" }, rules: [{ required: false, message: "请输入报废支数", trigger: "blur" }] },
{ label: "报废原因", name: "scrapReason", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废原因" }, rules: [{ required: false, message: "请输入报废原因", trigger: "blur" }] }, { label: "报废原因", name: "scrapReason", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废原因" }, rules: [{ required: false, message: "请输入报废原因", trigger: "blur" }] },
@ -112,10 +167,11 @@ export default {
label: "下一工序", name: "nextProcess", value: "", component: "dic", span: 24, label: "下一工序", name: "nextProcess", value: "", component: "dic", span: 24,
options: { group: "working", placeholder: "请输入下一工序" }, options: { group: "working", placeholder: "请输入下一工序" },
rules: [{ required: true, message: "请输入下一工序", trigger: "blur" }], rules: [{ required: true, message: "请输入下一工序", trigger: "blur" }],
hideHandle: "$.currentProcess == 'bz'" // hideHandle: "$.currentProcess == 'bz'"
hideHandle: "$.isCompleted == true"
}, },
{ {
label: "是否完成", name: "isCompleted", value: 1, component: "select", label: "是否完成", name: "isCompleted", value: 0, component: "select",
span: 24, span: 24,
options: { options: {
multiple: false, multiple: false,
@ -131,27 +187,11 @@ export default {
] ]
}, },
rules: [{ required: false, message: "请选择", trigger: "blur" }], rules: [{ required: false, message: "请选择", trigger: "blur" }],
hideHandle: "$.currentProcess != 'bz'" // hideHandle: "$.currentProcess != 'bz'"
}, },
{ label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } } { label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } }
] ]
}, },
finishFormOption: {
labelWidth: '100px',
labelPosition: 'center',
panelWidth: "800",
size: 'medium',
formItems: [
{ label: "完成数量", name: "completionQuantity", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入完成数量" }, rules: [{ required: true, message: "请输入完成数量", trigger: "blur" }] },
{ label: "完成重量", name: "completionWeight", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入完成重量" }, rules: [{ required: true, message: "请输入完成重量", trigger: "blur" }] },
{ label: "报废支数", name: "scrapPieces", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废支数" }, rules: [{ required: false, message: "请输入报废支数", trigger: "blur" }] },
{ label: "报废原因", name: "scrapReason", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入报废原因" }, rules: [{ required: false, message: "请输入报废原因", trigger: "blur" }] },
{ label: "框号", name: "frameNumber", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入框号" }, rules: [{ required: false, message: "请输入框号", trigger: "blur" }] },
{ label: "下一工序", name: "nextProcess", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入下一工序" }, rules: [{ required: false, message: "请输入下一工序", trigger: "blur" }] },
{ label: "是否完成", name: "isCompleted", value: "", component: "input", span: 24, options: { maxlength: "256", placeholder: "请输入是否完成" }, rules: [{ required: false, message: "请输入是否完成", trigger: "blur" }] },
{ label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } }
]
},
pageForm: { pageForm: {
title: "工序报工", title: "工序报工",
form: { form: {
@ -181,11 +221,11 @@ export default {
options: { valueFormat: "YYYY-MM-DD", placeholder: "请选择采购日期" }, options: { valueFormat: "YYYY-MM-DD", placeholder: "请选择采购日期" },
rules: [{ required: true, message: "请选择采购日期", trigger: "change" }] rules: [{ required: true, message: "请选择采购日期", trigger: "change" }]
}, },
{ // {
label: "当前工序", name: "currentProcess", value: "", component: "dic", span: 6, // label: "当前工序", name: "currentProcess", value: "", component: "dic", span: 6,
options: { group: "working" }, // options: { group: "working" },
rules: [{ required: true, message: "请选择当前工序", trigger: "change" }] // rules: [{ required: true, message: "请选择当前工序", trigger: "change" }]
}, // },
{ label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } }, { label: "备注", name: "remarks", value: "", component: "textarea", span: 24, options: { maxlength: "500", placeholder: "请输入备注" } },
] ]
}, },
@ -221,6 +261,13 @@ export default {
{ label: "生产支数", prop: "productionPieces", width: "200" }, { label: "生产支数", prop: "productionPieces", width: "200" },
{ label: "锯切方式", prop: "sawingMethod", width: "200" }, { label: "锯切方式", prop: "sawingMethod", width: "200" },
{ label: "生产理论重量", prop: "productionWeight", width: "200" }, { label: "生产理论重量", prop: "productionWeight", width: "200" },
{ label: "模具编码", prop: "moldCode", width: "200" },
{ label: "模具型号", prop: "moldModel", width: "200" },
{ label: "模厚", prop: "moldThickness", width: "200" },
{ label: "模具厂家", prop: "moldManufacturer", width: "200" },
{ label: "颜色", prop: "moldColor", width: "200" },
{ label: "换模原因", prop: "moldChangeReason", width: "200" },
{ label: "用棒支数", prop: "rodCount", width: "200" },
] ]
}, },
tableSelect: { tableSelect: {

@ -7,6 +7,17 @@
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<sc-form ref="formref" :config="config" v-model="form" :loading="loading" :formMode="mode" @submit="submit"> <sc-form ref="formref" :config="config" v-model="form" :loading="loading" :formMode="mode" @submit="submit">
<!-- 入库数量 -->
<template #netReceipts>
<el-input-number
v-model="form.netReceipts"
:step="1"
:min="0"
:precision="0"
:controls="true"
></el-input-number>
</template>
<!-- 入库数量 --> <!-- 入库数量 -->
<template #productionNumber> <template #productionNumber>
<el-input-number <el-input-number

@ -87,6 +87,34 @@
<span v-else>{{ scoped.row.inventoryQuantity }}</span> <span v-else>{{ scoped.row.inventoryQuantity }}</span>
</div> </div>
</template> </template>
<!-- 模具编码 -->
<template #moldCode="scoped">
<el-input v-model="scoped.row['moldCode']" placeholder=""></el-input>
</template>
<!-- 模具型号 -->
<template #moldModel="scoped">
<el-input v-model="scoped.row['moldModel']" placeholder=""></el-input>
</template>
<!-- 模厚 -->
<template #moldThickness="scoped">
<el-input v-model="scoped.row['moldThickness']" placeholder=""></el-input>
</template>
<!-- 模具厂家 -->
<template #moldManufacturer="scoped">
<el-input v-model="scoped.row['moldManufacturer']" placeholder=""></el-input>
</template>
<!-- 颜色 -->
<template #moldColor="scoped">
<el-input v-model="scoped.row['moldColor']" placeholder=""></el-input>
</template>
<!-- 换模原因 -->
<template #moldChangeReason="scoped">
<el-input v-model="scoped.row['moldChangeReason']" placeholder=""></el-input>
</template>
<!-- 用棒支数 -->
<template #rodCount="scoped">
<el-input v-model="scoped.row['rodCount']" placeholder=""></el-input>
</template>
</scTable> </scTable>
</el-card> </el-card>
</el-main> </el-main>
@ -101,8 +129,6 @@
</template> </template>
<script> <script>
import useTabs from "@/utils/useTabs";
import module from "./module"; import module from "./module";
import materialsSelect from "./materialsSelect"; import materialsSelect from "./materialsSelect";
@ -278,12 +304,6 @@ export default {
} }
}, },
back() { back() {
// useTabs.closeNext((tags) => {
// //'/usercenter'
// console.log(tags);
// this.$router.push(this.path);
// this.$route.is = true;
// });
this.visible = false; this.visible = false;
}, },
save() { save() {

@ -39,8 +39,8 @@
<el-table-column label="操作" fixed="right" align="center" width="120" v-if="config.option"> <el-table-column label="操作" fixed="right" align="center" width="120" v-if="config.option">
<template #default="scope"> <template #default="scope">
<el-button type="text" size="medium" @click="table_edit(scope.row, scope.$index)" v-if="config.option.edit"></el-button> <el-button type="text" size="medium" @click="table_edit(scope.row, scope.$index)" v-if="config.option.edit && scope.row.planStatus == 0"></el-button>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)" v-if="config.option.del"> <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)" v-if="config.option.del && scope.row.planStatus == 0">
<template #reference> <template #reference>
<el-button type="text" size="medium">删除</el-button> <el-button type="text" size="medium">删除</el-button>
</template> </template>

@ -142,6 +142,7 @@ export default {
}, },
column2: [ column2: [
{ label: "", prop: "id", width: "200", hide: true }, { label: "", prop: "id", width: "200", hide: true },
{ label: "订单号", prop: "orderNo", width: "200" },
{ label: "物料编码", prop: "materialCode", width: "200" }, { label: "物料编码", prop: "materialCode", width: "200" },
{ label: "物料名称", prop: "materialName", width: "200" }, { label: "物料名称", prop: "materialName", width: "200" },
{ label: "订单长度 (M)", prop: "orderLength", width: "200" }, { label: "订单长度 (M)", prop: "orderLength", width: "200" },

@ -1,32 +1,74 @@
<template> <template>
<el-container style="position: relative;"> <el-container style="position: relative">
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<!-- <el-button type="primary" icon="el-icon-plus" @click="add"></el-button> --> <!-- <el-button type="primary" icon="el-icon-plus" @click="add"></el-button> -->
<el-button type="primary" icon="el-icon-plus" @click="page_add"></el-button> <el-button
<el-button type="danger" v-if="config && config.bathDel" @click="batch_del"></el-button> type="primary"
icon="el-icon-plus"
@click="page_add"
></el-button>
<el-button
type="danger"
v-if="config && config.bathDel"
@click="batch_del"
>删除</el-button
>
</div> </div>
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="search.documentNumber" v-model="search.documentNumber"
placeholder="单据编号" placeholder="单据编号"
clearable> clearable
>
</el-input> </el-input>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button> <el-button
type="primary"
icon="el-icon-search"
@click="upsearch"
></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" :column="column" :remoteFilter="config.remoteFilter" row-key="" @selection-change="selectionChange"> <scTable
ref="table"
:apiObj="apiObj"
:column="column"
:remoteFilter="config.remoteFilter"
row-key=""
@selection-change="selectionChange"
>
<el-table-column type="selection" width="50"></el-table-column> <el-table-column type="selection" width="50"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120" v-if="config.option"> <el-table-column
label="操作"
fixed="right"
align="center"
width="200"
v-if="config.option"
>
<template #default="scope"> <template #default="scope">
<!-- <el-button type="text" size="medium" @click="table_edit(scope.row, scope.$index)" v-if="config.option.edit"></el-button> --> <!-- <el-button type="text" size="medium" @click="table_edit(scope.row, scope.$index)" v-if="config.option.edit"></el-button> -->
<el-button type="text" size="medium" @click="page_edit(scope.row)" v-if="config.option.edit && scope.row.isWarehouse != 1"></el-button> <el-button
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)" v-if="config.option.del && scope.row.isWarehouse != 1"> type="text"
size="medium"
@click="page_edit(scope.row)"
v-if="config.option.edit && scope.row.noEdit == 0"
>编辑</el-button
>
<el-button
type="text"
size="medium"
@click="once_add_plan(scope.row)"
v-if="config.option.edit && scope.row.noEdit == 0"
>生成计划单</el-button
>
<el-popconfirm
title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)"
v-if="config.option.del && scope.row.noEdit == 0"
>
<template #reference> <template #reference>
<el-button type="text" size="medium">删除</el-button> <el-button type="text" size="medium">删除</el-button>
</template> </template>
@ -35,59 +77,62 @@
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<save-page ref="savePage" v-if="dialog.savePage" @closed="dialog.savePage = false" @success="handleSuccess"></save-page> <save-page
ref="savePage"
v-if="dialog.savePage"
@closed="dialog.savePage = false"
@success="handleSuccess"
></save-page>
</el-container> </el-container>
</template> </template>
<script> <script>
import module from './module' import module from "./module";
import config from "@/config" import config from "@/config";
import savePage from './savePage' import savePage from "./savePage";
export default { export default {
components: { components: {
savePage savePage,
}, },
data() { data() {
return { return {
dialog: { dialog: {
save: false, save: false,
product: false, product: false,
savePage: false savePage: false,
}, },
loading:false, loading: false,
file:"", file: "",
search: { search: {
documentNumber: "" documentNumber: "",
}, },
apiObj:this.$API[module.name][module.list], apiObj: this.$API[module.name][module.list],
selection: [], selection: [],
config: module.config, config: module.config,
options: module.options, options: module.options,
column: module.column column: module.column,
} };
},
mounted(){
}, },
mounted() {},
methods: { methods: {
// //
importExcel(){ importExcel() {
this.dialog.importExcel = true this.dialog.importExcel = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.importExcelDialog.open() this.$refs.importExcelDialog.open();
}) });
}, },
// //
handleReset(){ handleReset() {
console.log('handleReset method called'); console.log("handleReset method called");
// 1. // 1.
this.search = {}; this.search = {};
var search = { var search = {
email: "" email: "",
}; // {} }; // {}
// 2. // 2.
@ -97,94 +142,117 @@ export default {
} }
}, },
// //
add(){ add() {
// this.dialog.save = true // this.dialog.save = true
this.dialog.product = true this.dialog.product = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productMaterialsDialog.open('add', this.list) this.$refs.productMaterialsDialog.open("add", this.list);
// this.$refs.saveDialog.open('add', this.list) // this.$refs.saveDialog.open('add', this.list)
}) });
}, },
page_add() { page_add() {
// this.$router.push({ // this.$router.push({
// path: '/mini/procurement/purchaseOrders/savePage', // path: '/mini/procurement/purchaseOrders/savePage',
// query: { // query: {
// path: '/mini/procurement/purchaseOrders', // path: '/mini/procurement/purchaseOrders',
// } // }
// }) // })
this.dialog.savePage = true this.dialog.savePage = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.savePage.open('add') this.$refs.savePage.open("add");
// this.$refs.saveDialog.open('add', this.list) // this.$refs.saveDialog.open('add', this.list)
}) });
}, },
page_edit(row) { page_edit(row) {
// this.$router.push({ // this.$router.push({
// path: '/mini/procurement/purchaseOrders/savePage', // path: '/mini/procurement/purchaseOrders/savePage',
// query: { // query: {
// path: '/mini/procurement/purchaseOrders', // path: '/mini/procurement/purchaseOrders',
// id: row.documentNumber // id: row.documentNumber
// } // }
// }) // })
this.dialog.savePage = true this.dialog.savePage = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.savePage.open('edit').setData(row); this.$refs.savePage.open("edit").setData(row);
// this.$refs.saveDialog.open('add', this.list) // this.$refs.saveDialog.open('add', this.list)
}) });
},
//
async once_add_plan(row) {
const loading = this.$loading();
var reqData = {
type: "once",
orderInfo: row,
form: {
isAuto: true,
},
};
var res = await this.$API.productionSchedule.save.http(reqData);
if (res.code == 0) {
this.$refs.table.refresh();
this.$message.success("计划单生成成功");
} else {
this.$alert(res.message, "提示", { type: "error" });
}
loading.close();
}, },
// //
table_edit(row){ table_edit(row) {
this.dialog.product = true this.dialog.product = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productMaterialsDialog.open('edit', this.list).setData(row) this.$refs.productMaterialsDialog.open("edit", this.list).setData(row);
// this.$refs.saveDialog.open('edit', this.list).setData(row) // this.$refs.saveDialog.open('edit', this.list).setData(row)
}) });
}, },
// //
async table_del(row, index){ async table_del(row, index) {
var reqData = {id: row[this.config.delId?this.config.delId:"id"]} var reqData = { id: row[this.config.delId ? this.config.delId : "id"] };
var res = await this.$API[module.name][module.del].http(reqData); var res = await this.$API[module.name][module.del].http(reqData);
if(res.code == 0){ if (res.code == 0) {
// OR / // OR /
this.$refs.table.upData(); this.$refs.table.upData();
this.$message.success("删除成功"); this.$message.success("删除成功");
}else{ } else {
this.$alert(res.message, "提示", {type: 'error'}) this.$alert(res.message, "提示", { type: "error" });
} }
}, },
// //
async batch_del(){ async batch_del() {
if (this.selection.length == 0) { if (this.selection.length == 0) {
this.$alert("请选择需要删除的数据", "提示", {type: 'warning'}) this.$alert("请选择需要删除的数据", "提示", { type: "warning" });
return; return;
} }
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, '提示', { this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?`, "提示", {
type: 'warning' type: "warning",
}).then(async () => {
const loading = this.$loading();
console.log(this.selection)
var idArr = [];
this.selection.forEach(item => {
idArr.push(item[this.config.delId?this.config.delId:"id"])
})
var reqData = {type: "batch", ids: idArr.join(",")}
var res = await this.$API[module.name][module.del].http(reqData);
if(res.code == 0){
// OR /
this.$refs.table.refresh();
this.$message.success("删除成功");
}else{
this.$alert(res.message, "提示", {type: 'error'})
}
loading.close();
}).catch(() => {
this.$message.success("操作失败")
}) })
.then(async () => {
const loading = this.$loading();
console.log(this.selection);
var idArr = [];
this.selection.forEach((item) => {
idArr.push(item[this.config.delId ? this.config.delId : "id"]);
});
var reqData = { type: "batch", ids: idArr.join(",") };
var res = await this.$API[module.name][module.del].http(reqData);
if (res.code == 0) {
// OR /
this.$refs.table.refresh();
this.$message.success("删除成功");
} else {
this.$alert(res.message, "提示", { type: "error" });
}
loading.close();
})
.catch(() => {
this.$message.success("操作失败");
});
}, },
// //
selectionChange(selection){ selectionChange(selection) {
this.selection = selection; this.selection = selection;
}, },
filterChange(obj) { filterChange(obj) {
@ -192,20 +260,20 @@ export default {
this.upsearch(); this.upsearch();
}, },
// //
upsearch(){ upsearch() {
this.$refs.table.upData(this.search); this.$refs.table.upData(this.search);
}, },
// //
handleSuccess(data, mode){ handleSuccess(data, mode) {
this.$refs.table.upData() this.$refs.table.upData();
}, },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.upload { .upload {
color: #409EFF; color: #409eff;
background: #ecf5ff; background: #ecf5ff;
min-height: 32px; min-height: 32px;
padding: 9px 15px; padding: 9px 15px;

@ -4,6 +4,7 @@
v-model="visible" v-model="visible"
:width="panelWidth" :width="panelWidth"
destroy-on-close destroy-on-close
:append-to-body="true"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<el-container> <el-container>
@ -109,7 +110,8 @@ export default {
return this; return this;
}, },
setData(listData) { setData(listData) {
this.listData = listData; // this.listData = listData;
this.listData = [];
}, },
selectable(row, index) { selectable(row, index) {
return !this.listData.some(item => row.materialCode == item.materialCode) return !this.listData.some(item => row.materialCode == item.materialCode)
@ -130,5 +132,8 @@ export default {
}; };
</script> </script>
<style> <style lang="less" scoped>
.el-dialog__header {
padding: 20px 20px 10px;
}
</style> </style>

@ -181,13 +181,11 @@ export default {
}, },
'form.customerId': { 'form.customerId': {
handler(value, old) { handler(value, old) {
console.log('form.customerId', value)
const formItems = module.pageForm.form.formItems const formItems = module.pageForm.form.formItems
const fields = formItems.filter(item => { const fields = formItems.filter(item => {
return item.name == 'customerId' return item.name == 'customerId'
})[0] })[0]
const items = fields.options.items const items = fields.options.items
console.log(fields)
if (!!items) { if (!!items) {
const curObj = items.filter(item => { const curObj = items.filter(item => {
return item.value == value return item.value == value
@ -201,7 +199,6 @@ export default {
}, },
listData: { listData: {
handler(newVal) { handler(newVal) {
console.log(this.form)
newVal.forEach((item) => { newVal.forEach((item) => {
/* 理论支重 */ /* 理论支重 */
item["theoreticalWeightPerPiece"] = parseFloat( item["theoreticalWeightPerPiece"] = parseFloat(
@ -240,7 +237,6 @@ export default {
); );
/* 含税单价 */ /* 含税单价 */
console.log("item", item)
item["priceWithTax"] = parseFloat( item["priceWithTax"] = parseFloat(
(Number(item["unitPrice"]) + (Number(item["unitPrice"]) +
parseFloat( parseFloat(
@ -310,17 +306,29 @@ export default {
}); });
}, },
delete_materials() { delete_materials() {
this.listData = this.listData.filter( this.listData = this.listData.filter(
(item1) => (item1) =>
!this.selection.some( !this.selection.some(
(item2) => item2.materialCode === item1.materialCode (item2) => item2.curIndex === item1.curIndex
) )
); );
let curIndex = 0;
this.listData.forEach((item) => {
curIndex = curIndex + 1
item['curIndex'] = curIndex;
});
this.selection = []; this.selection = [];
}, },
handleSuccess(data) { handleSuccess(data) {
const _this = this; const _this = this;
let curIndex = this.listData.length
data.forEach((item) => { data.forEach((item) => {
curIndex = curIndex + 1
item['curIndex'] = curIndex;
for (let key in _this.initComputed) { for (let key in _this.initComputed) {
if (!item[key]) { if (!item[key]) {
item[key] = _this.initComputed[key]; item[key] = _this.initComputed[key];
@ -328,6 +336,7 @@ export default {
} }
}); });
this.listData = [...data, ...this.listData]; this.listData = [...data, ...this.listData];
console.log("this.listData", this.listData)
}, },
async queryInventoryQuantity(row) { async queryInventoryQuantity(row) {
// //
@ -343,7 +352,6 @@ export default {
back() { back() {
// useTabs.closeNext((tags) => { // useTabs.closeNext((tags) => {
// //'/usercenter' // //'/usercenter'
// console.log(tags);
// this.$router.push(this.path); // this.$router.push(this.path);
// this.$route.is = true; // this.$route.is = true;
// }); // });
@ -361,7 +369,6 @@ export default {
materials: this.listData, materials: this.listData,
orderInfo: this.form, orderInfo: this.form,
}; };
console.log(params);
var res = null; var res = null;
if (this.mode == "edit") { if (this.mode == "edit") {

@ -166,6 +166,7 @@ export default {
}, },
column2: [ column2: [
{ label: "", prop: "id", width: "200", hide: true }, { label: "", prop: "id", width: "200", hide: true },
{ label: "订单号", prop: "orderNo", width: "200" },
{ label: "物料编码", prop: "materialCode", width: "200" }, { label: "物料编码", prop: "materialCode", width: "200" },
{ label: "物料名称", prop: "materialName", width: "200" }, { label: "物料名称", prop: "materialName", width: "200" },
{ label: "订单长度 (M)", prop: "orderLength", width: "200" }, { label: "订单长度 (M)", prop: "orderLength", width: "200" },

Loading…
Cancel
Save