Commit 7e43dd49 authored by 沈翠玲's avatar 沈翠玲

生产排产

parent fdcce4e4
......@@ -82,7 +82,7 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('标准工时')" prop="stdWorkingTime" align="center" >
<el-table-column :label="$t('标准工时')" prop="stdWorkingTime" align="center" width="100">
<template slot-scope="scope">
<el-input
v-model="scope.row.stdWorkingTime"
......@@ -92,7 +92,7 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('换型时间')" prop="lineBreakTime" align="center" >
<el-table-column :label="$t('换型时间')" prop="lineBreakTime" align="center" width="100">
<template slot-scope="scope">
<el-input
v-model="scope.row.lineBreakTime"
......@@ -106,6 +106,7 @@
:label="$t('工时单位')"
prop="stdWorkingTimeUom"
align="center"
width="100"
>
<template slot-scope="scope">
<el-select
......@@ -124,9 +125,19 @@
</el-select>
</template>
</el-table-column>
<el-table-column :label="$t('单价')" prop="unitPrice" align="center" width="165">
<template slot-scope="scope">
<el-input-number
style="width: 140px"
v-model="scope.row.unitPrice"
placeholder
></el-input-number>
</template>
</el-table-column>
<el-table-column
:label="$t('是否外协')"
prop="outsourced"
width="100"
align="center"
>
<template slot-scope="scope">
......@@ -148,7 +159,7 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('计量单位')" prop="unitOfMeasure" align="center" >
<el-table-column :label="$t('计量单位')" prop="unitOfMeasure" align="center" width="100">
<template slot-scope="scope">
<el-input
v-model="scope.row.unitOfMeasure"
......@@ -158,7 +169,7 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('关键工序')" prop="keyFlag" align="center">
<el-table-column :label="$t('关键工序')" prop="keyFlag" align="center" width="100">
<template slot-scope="scope">
<el-select
v-model="scope.row.keyFlag" v-if="mode !== 'info'"
......@@ -179,7 +190,7 @@
/>
</template>
</el-table-column>
<el-table-column :label="$t('是否质检')" prop="isCheck" align="center">
<el-table-column :label="$t('是否质检')" prop="isCheck" align="center" width="100">
<template slot-scope="scope">
<el-select
v-model="scope.row.isCheck" v-if="mode !== 'info'"
......
......@@ -34,7 +34,6 @@
<el-table-column :label="$t('成品物料编码')" align="center" prop="itemCode" />
<el-table-column :label="$t('成品物料名称')" align="center" prop="itemName" />
<el-table-column :label="$t('生产用途')" align="center" prop="usageName" />
<el-table-column :label="$t('单价')" align="center" prop="unitPrice" />
<el-table-column :label="$t('打样订单')" align="center" prop="sapPrototypeMakeCode" />
<el-table-column :label="$t('common.remark')" align="center" prop="remark" />
<!-- <el-table-column :label="$t('common.status')" align="center" width="100" prop="status">
......
......@@ -97,14 +97,6 @@
></el-input>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item :label="$t('单价')" prop="unitPrice">
<el-input-number
v-model="form.unitPrice"
placeholder
></el-input-number>
</el-form-item>
</el-col>
<el-col :lg="6" :md="8" :sm="12" :xs="12">
<el-form-item :label="$t('是否允许超报')" prop="surpassState">
<el-select
......@@ -213,7 +205,6 @@ export default {
factoryCode: "",
sapUsageId: "",
remark: "",
unitPrice: "",
createBy: "",
createTime: "",
itemCode: "",
......@@ -408,7 +399,6 @@ export default {
sapItemCode: "",
factoryCode: "",
remark: "",
unitPrice: "",
createBy: "",
createTime: "",
updateBy: "",
......
......@@ -291,8 +291,7 @@ import {
addQrcodeRecord,
updateQrcodeRecord,
} from '@/api/mes/pro/qrcodeRecord'
import { postPrintPdf } from '@/utils/ruoyi'
import { postBatchPrintPdf } from '@/utils/ruoyi'
export default {
name: 'QrcodeRecord',
data() {
......@@ -378,33 +377,23 @@ export default {
handlePrint() {},
printQrCode() {
const promise = []
const noTemplate = []
let detail = []
if(!this.selectRow[0].templateName) {
this.$message.warning(this.$t('没有配置标签模版'))
}
this.selectRow.forEach((s, i) => {
let detail = []
if (s.templateName) {
promise.push(
updateQrcodeRecord({ ...s, ...{ printTime: s.printTime + 1 } })
)
detail.push({
barcode: s.qrcode,
showText: '',
gp: i + 1,
})
detail.push({
promise.push(
updateQrcodeRecord({ ...s, ...{ printTime: s.printTime + 1 } })
)
detail.push({
detail: [{
barcode: s.qrcode,
showText: '',
gp: i + 1,
})
postPrintPdf(s.templateName, {
detail,
})
} else {
noTemplate.push(s.qrcode)
}
gp: i + 1
}]
})
})
if(noTemplate.length > 0) {
this.$message.warning(noTemplate.join(',') + this.$t('没有配置标签模版'))
}
postBatchPrintPdf(this.selectRow[0].templateName, detail)
if (promise.length > 0) {
Promise.all(promise).then((res) => {
this.getList()
......@@ -463,6 +452,9 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
if (!this.queryWorkParams.workorderCode && !this.queryParams.qrcode) {
return this.$message.error(this.$t('请输入查询条件'))
}
this.queryParams.pageNum = 1
this.getList()
},
......
......@@ -137,14 +137,15 @@
@click="handleOpenTask"
>{{$t('转委外')}}</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleSumbmitMakeProduction"
>下达生产</el-button>
</el-col> -->
:disabled='multiple'
@click="handlePrint"
>打印</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -508,6 +509,8 @@ import jobAssign from './jobAssign.vue'
import arrangCodeList from './arrangCodeList.vue'
import WorkuintSelect from "./workunitSelectSche.vue";
import dayjs from 'dayjs'
import { postBatchPrintPdf } from '@/utils/ruoyi'
export default {
components: {BrandSelect, taskList, OrderList, arrangCodeList, WorkuintSelect, jobAssign},
dicts: ['TASK_STATUS'],
......@@ -717,6 +720,14 @@ export default {
this.opena = false;
this.reset();
},
handlePrint(){
postBatchPrintPdf(
'',
this.selections
).then(()=> {
})
},
// 表单重置
reset() {
this.form = {
......
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