|
|
@@ -123,7 +123,7 @@
|
|
|
placeholder="请输入"
|
|
|
></el-input
|
|
|
></el-descriptions-item>
|
|
|
- <el-descriptions-item label="">
|
|
|
+ <!-- <el-descriptions-item label="">
|
|
|
<span class="label-required after" slot="label">合格品数量(PCS)</span>
|
|
|
<el-form-item
|
|
|
label=""
|
|
|
@@ -164,7 +164,7 @@
|
|
|
"
|
|
|
clearable
|
|
|
></el-input> </el-form-item
|
|
|
- ></el-descriptions-item>
|
|
|
+ ></el-descriptions-item> -->
|
|
|
<el-descriptions-item label="">
|
|
|
<span class="label-required after" slot="label"
|
|
|
>不合格品数量(PCS)</span
|
|
|
@@ -186,7 +186,14 @@
|
|
|
: value)
|
|
|
"
|
|
|
clearable
|
|
|
- ></el-input>
|
|
|
+ ><el-button
|
|
|
+ type="primary"
|
|
|
+ slot="suffix"
|
|
|
+ size="mini"
|
|
|
+ @click="handleOpen(1)"
|
|
|
+ >处置</el-button
|
|
|
+ ></el-input
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="不合格品重量(KG)"
|
|
|
@@ -205,7 +212,7 @@
|
|
|
clearable
|
|
|
></el-input
|
|
|
></el-descriptions-item>
|
|
|
- <el-descriptions-item label="副产品重量(KG)"
|
|
|
+ <!-- <el-descriptions-item label="副产品重量(KG)"
|
|
|
><el-input
|
|
|
class="w100"
|
|
|
v-model="workReport.productInfo.byProductWeight"
|
|
|
@@ -216,12 +223,51 @@
|
|
|
: value)
|
|
|
"
|
|
|
clearable
|
|
|
- ></el-input
|
|
|
- ></el-descriptions-item>
|
|
|
+ ><el-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-top: 4px"
|
|
|
+ slot="suffix"
|
|
|
+ size="mini"
|
|
|
+ @click="handleOpen(2)"
|
|
|
+ >处置</el-button
|
|
|
+ ></el-input
|
|
|
+ ></el-descriptions-item
|
|
|
+ > -->
|
|
|
<el-descriptions-item label="备注">
|
|
|
<el-input v-model="workReport.remark"></el-input
|
|
|
></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
+
|
|
|
+ <ele-pro-table
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="carList"
|
|
|
+ :need-page="false"
|
|
|
+ class="mt-16"
|
|
|
+ >
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-link type="primary" @click="addCar">添加周转车</el-link>
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="{ $index }">
|
|
|
+ <el-link type="danger" @click="handleDelete($index)">删除</el-link>
|
|
|
+ </template>
|
|
|
+ <template v-slot:standardNum="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-model="row.standardNum"
|
|
|
+ @change="
|
|
|
+ () => {
|
|
|
+ row.standardWeight =
|
|
|
+ row.standardNum === ''
|
|
|
+ ? ''
|
|
|
+ : multiply(
|
|
|
+ row.standardNum,
|
|
|
+ infoData.productUnitWeight || 1
|
|
|
+ );
|
|
|
+ }
|
|
|
+ "
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
<el-descriptions
|
|
|
title="设备信息"
|
|
|
class="mt-16"
|
|
|
@@ -260,6 +306,8 @@
|
|
|
</el-card>
|
|
|
<equipmentDailog ref="equipmentRef" :taskId="taskInfo.id" />
|
|
|
<catogaryDialog ref="catogaryDialogRef" />
|
|
|
+ <carDialog ref="carDialogRef" />
|
|
|
+ <handleDialog ref="handleDialogRef" />
|
|
|
</el-form>
|
|
|
</template>
|
|
|
|
|
|
@@ -268,10 +316,18 @@
|
|
|
import equipmentDailog from '@/components/EquipmentDailog/report-equipment';
|
|
|
import { reportCount } from '@/api/produceOrder';
|
|
|
import catogaryDialog from '../catogaryDialog.vue';
|
|
|
+ import handleDialog from './components/handleDialog';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { multiply } from '@/utils/math';
|
|
|
+ import carDialog from '../carDialog.vue';
|
|
|
export default {
|
|
|
- components: { personSelectRemote, equipmentDailog, catogaryDialog },
|
|
|
+ components: {
|
|
|
+ handleDialog,
|
|
|
+ personSelectRemote,
|
|
|
+ equipmentDailog,
|
|
|
+ carDialog,
|
|
|
+ catogaryDialog
|
|
|
+ },
|
|
|
props: {
|
|
|
infoData: {
|
|
|
type: Object,
|
|
|
@@ -296,6 +352,33 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '编码',
|
|
|
+ prop: 'code'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称',
|
|
|
+ prop: 'name'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '合格品数量',
|
|
|
+ slot: 'standardNum'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '合格品重量',
|
|
|
+ prop: 'standardWeight'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '操作',
|
|
|
+ slot: 'action'
|
|
|
+ }
|
|
|
+ ],
|
|
|
categoryMsg: {
|
|
|
batchNo: '',
|
|
|
number: '',
|
|
|
@@ -306,6 +389,8 @@
|
|
|
name: '',
|
|
|
code: ''
|
|
|
},
|
|
|
+ carList: [],
|
|
|
+ disposeOrderList: [],
|
|
|
workReport: {
|
|
|
qualityItem: '',
|
|
|
qualityStandard: '',
|
|
|
@@ -314,7 +399,7 @@
|
|
|
executeTime: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
|
|
|
remark: '',
|
|
|
productInfo: {
|
|
|
- byProductWeight: '',
|
|
|
+ // byProductWeight: '',
|
|
|
standardNum: '',
|
|
|
standardWeight: '',
|
|
|
noStandardNum: '',
|
|
|
@@ -400,6 +485,37 @@
|
|
|
},
|
|
|
methods: {
|
|
|
multiply,
|
|
|
+ handleDelete(index) {
|
|
|
+ this.$confirm('确认删除当前周转车?').then(() => {
|
|
|
+ this.carList.splice(index, 1);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addCar() {
|
|
|
+ this.$refs.carDialogRef.open(this.carList, (list) => {
|
|
|
+ this.carList = list.map((item) => ({
|
|
|
+ ...item,
|
|
|
+ sourceCategoryId: item.categoryId,
|
|
|
+ brandNum: item.brand,
|
|
|
+ standardWeight: '',
|
|
|
+ standardNum: ''
|
|
|
+ }));
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleOpen(disposeType) {
|
|
|
+ this.$refs.handleDialogRef.open(disposeType, (data) => {
|
|
|
+ data.workOrderCode = this.infoData.code;
|
|
|
+ data.workOrderId = this.infoData.id;
|
|
|
+
|
|
|
+ let index = this.disposeOrderList.find(
|
|
|
+ (i) => i.disposeType == disposeType
|
|
|
+ );
|
|
|
+ if (index > -1) {
|
|
|
+ this.disposeOrderList[index] = data;
|
|
|
+ } else {
|
|
|
+ this.disposeOrderList.push(data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getCategory(id, memo) {
|
|
|
this.$refs.catogaryDialogRef.open(id, this[memo], (res) => {
|
|
|
this[memo].rootCategoryLevelId = res.categoryLevelId;
|
|
|
@@ -446,6 +562,10 @@
|
|
|
if (!this.workReportDeviceList.code) {
|
|
|
return this.$message.error('请选择设备');
|
|
|
}
|
|
|
+ if (!this.carList.length) {
|
|
|
+ return this.$message.error('请选择周转车');
|
|
|
+ }
|
|
|
+
|
|
|
this.$confirm('是否确定要报工?', '提示').then(() => {
|
|
|
this.categoryMsg = Object.assign(this.categoryMsg, {
|
|
|
brandNum: this.infoData.brandNo,
|
|
|
@@ -454,15 +574,20 @@
|
|
|
code: this.infoData.productCode
|
|
|
});
|
|
|
|
|
|
- const workReportCategoryList = [this.categoryMsg];
|
|
|
+ const workReportDeviceList = this.carList;
|
|
|
+ if (this.workReportDeviceList.code) {
|
|
|
+ workReportDeviceList.push(this.workReportDeviceList);
|
|
|
+ }
|
|
|
+
|
|
|
if (this.boatMsg.code) {
|
|
|
- workReportCategoryList.push(this.boatMsg);
|
|
|
+ workReportDeviceList.push(this.boatMsg);
|
|
|
}
|
|
|
fun({
|
|
|
checkState: 1,
|
|
|
+ disposeOrderList: this.disposeOrderList,
|
|
|
workReport: this.workReport,
|
|
|
- workReportDeviceList: [this.workReportDeviceList],
|
|
|
- workReportCategoryList
|
|
|
+ workReportDeviceList,
|
|
|
+ workReportCategoryList: [this.categoryMsg]
|
|
|
}).then((res) => {
|
|
|
// this.$message.success('报工成功!');
|
|
|
// this.getReportCount();
|