Merge branch 'projects/mesxc-test' into projects/mesxc-dy
This commit is contained in:
commit
e211e585af
@ -34,6 +34,15 @@ export function workOrderList(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 条件获得工单列表
|
||||||
|
export function getFreeWOlist(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-work-order/getFreeWOlist',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获得订单分页
|
// 获得订单分页
|
||||||
export function getOrderPage(query) {
|
export function getOrderPage(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-18 09:33:57
|
* @Date: 2023-10-18 09:33:57
|
||||||
* @LastEditTime: 2023-11-03 09:31:17
|
* @LastEditTime: 2024-03-15 15:18:09
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -33,3 +33,12 @@ export function exportEnergyPlcExcel(query) {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function exportEquipmentTraceabilityExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/analysis/equipment-analysis/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -104,7 +104,7 @@ export const DICT_TYPE = {
|
|||||||
ORDER_PRIORITY: 'order_priority',
|
ORDER_PRIORITY: 'order_priority',
|
||||||
PACK_SPEC: 'pack_spec',
|
PACK_SPEC: 'pack_spec',
|
||||||
WORK_ORDER_STATUS: 'work_order_status',
|
WORK_ORDER_STATUS: 'work_order_status',
|
||||||
|
|
||||||
// ============== EQUIPMENT - 设备模块 =============
|
// ============== EQUIPMENT - 设备模块 =============
|
||||||
MAINTAIN_TYPE: 'maintain_type',
|
MAINTAIN_TYPE: 'maintain_type',
|
||||||
FAULT_LEVEL: 'fault-level',
|
FAULT_LEVEL: 'fault-level',
|
||||||
@ -116,7 +116,9 @@ export const DICT_TYPE = {
|
|||||||
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
|
ENVIRONMENT_CHECK_UNIT: 'environment_check_unit',
|
||||||
|
|
||||||
// ============== GROUP - 班组模块 =============
|
// ============== GROUP - 班组模块 =============
|
||||||
WORK_SHOP: 'workshop'
|
WORK_SHOP: 'workshop',
|
||||||
|
// ============== GROUP - 质量模块 =============
|
||||||
|
MATERIAL_GRADE: 'material_grade'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,38 +4,23 @@
|
|||||||
<el-col :span='12'>
|
<el-col :span='12'>
|
||||||
<el-form-item label="能源类型" prop="energyTypeId">
|
<el-form-item label="能源类型" prop="energyTypeId">
|
||||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option v-for="item in this.energyTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in this.energyTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='12'>
|
||||||
<el-form-item label="抄表日期" prop="recordTime">
|
<el-form-item label="抄表日期" prop="recordTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.recordTime" type="date" format="yyyy-MM-dd" value-format="timestamp"
|
||||||
v-model="form.recordTime"
|
placeholder="选择日期" style="width: 100%;">
|
||||||
type="date"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
value-format="timestamp"
|
|
||||||
placeholder="选择日期"
|
|
||||||
style="width: 100%;">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='24'>
|
<el-col :span='24'>
|
||||||
<base-table
|
<base-table border :table-props="tableProps" :table-data="tableData" :add-button-show="addButtonShow"
|
||||||
border
|
@emitFun="inputChange" @emitButtonClick="emitButtonClick" />
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="tableData"
|
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitFun="inputChange"
|
|
||||||
@emitButtonClick="emitButtonClick"
|
|
||||||
/>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -46,17 +31,17 @@ import moment from 'moment'
|
|||||||
import InputArea from './InputArea'
|
import InputArea from './InputArea'
|
||||||
import SelectArea from './SelectArea'
|
import SelectArea from './SelectArea'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '表名',
|
label: '表名*',
|
||||||
subcomponent: SelectArea
|
subcomponent: SelectArea
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'readingQuantity',
|
prop: 'readingQuantity',
|
||||||
label: '抄表数',
|
label: '抄表数*',
|
||||||
subcomponent: InputArea
|
subcomponent: InputArea
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: 'EnergyQuantityManualAdd',
|
name: 'EnergyQuantityManualAdd',
|
||||||
props: {
|
props: {
|
||||||
@ -72,7 +57,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
addButtonShow:'新增',
|
addButtonShow: '新增',
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
energyTypeId: '',
|
energyTypeId: '',
|
||||||
@ -98,16 +83,16 @@ export default {
|
|||||||
obj.tableName = params.tableName + ''
|
obj.tableName = params.tableName + ''
|
||||||
obj.readingQuantity = 0
|
obj.readingQuantity = 0
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
}else {
|
} else {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = params.id
|
this.form.id = params.id
|
||||||
this.addButtonShow = ''
|
this.addButtonShow = ''
|
||||||
energyQuantityManualGet({id: this.form.id}).then(res => {
|
energyQuantityManualGet({ id: this.form.id }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.energyTypeId = res.data.energyTypeId
|
this.form.energyTypeId = res.data.energyTypeId
|
||||||
this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
|
this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.tableName = res.data.tableName ? res.data.tableName+'' : ''
|
obj.tableName = res.data.tableName ? res.data.tableName + '' : ''
|
||||||
obj.readingQuantity = res.data.readingQuantity
|
obj.readingQuantity = res.data.readingQuantity
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
}
|
}
|
||||||
@ -130,10 +115,10 @@ export default {
|
|||||||
if (this.tableData.length === 0) {
|
if (this.tableData.length === 0) {
|
||||||
this.$modal.msgError("抄表数据不能为空");
|
this.$modal.msgError("抄表数据不能为空");
|
||||||
return false
|
return false
|
||||||
}else{
|
} else {
|
||||||
for (let item of this.tableData) {
|
for (let item of this.tableData) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (!item.tableName || (!item.readingQuantity && item.readingQuantity!==0)) {
|
if (!item.tableName || (!item.readingQuantity && item.readingQuantity !== 0)) {
|
||||||
this.$modal.msgError("抄表数据有空值,请检查");
|
this.$modal.msgError("抄表数据有空值,请检查");
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -142,11 +127,11 @@ export default {
|
|||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
// 编辑
|
// 编辑
|
||||||
energyQuantityManualUpdate({
|
energyQuantityManualUpdate({
|
||||||
id:this.form.id,
|
id: this.form.id,
|
||||||
energyTypeId:this.form.energyTypeId,
|
energyTypeId: this.form.energyTypeId,
|
||||||
recordTime:this.form.recordTime,
|
recordTime: this.form.recordTime,
|
||||||
tableName:this.tableData[0].tableName,
|
tableName: this.tableData[0].tableName,
|
||||||
readingQuantity:this.tableData[0].readingQuantity
|
readingQuantity: this.tableData[0].readingQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -155,9 +140,9 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
energyQuantityManualCreate({
|
energyQuantityManualCreate({
|
||||||
energyTypeId:this.form.energyTypeId,
|
energyTypeId: this.form.energyTypeId,
|
||||||
recordTime:this.form.recordTime,
|
recordTime: this.form.recordTime,
|
||||||
data:this.tableData
|
data: this.tableData
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -2,44 +2,20 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:max-height="tableH" @selection-change="selectChange">
|
||||||
:limit="queryParams.pageSize"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
:table-props="tableProps"
|
@clickBtn="handleClick" />
|
||||||
:table-data="list"
|
|
||||||
:max-height="tableH"
|
|
||||||
@selection-change="selectChange"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:page.sync="queryParams.pageNo"
|
@pagination="getList" />
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="centervisible" @cancel="handleCancel"
|
||||||
:dialogTitle="addOrEditTitle"
|
@confirm="handleConfirm" :before-close="handleCancel">
|
||||||
:dialogVisible="centervisible"
|
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList"
|
||||||
@cancel="handleCancel"
|
@successSubmit="successSubmit" />
|
||||||
@confirm="handleConfirm"
|
|
||||||
:before-close="handleCancel"
|
|
||||||
>
|
|
||||||
<energy-quantity-manual-add ref="energyQuantityManualAdd" :energyTypeList="energyTypeList" @successSubmit="successSubmit" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -68,7 +44,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '水/气表名',
|
label: '能源表名',
|
||||||
filter: publicFormatter('table_name'),
|
filter: publicFormatter('table_name'),
|
||||||
minWidth: 110
|
minWidth: 110
|
||||||
},
|
},
|
||||||
@ -142,25 +118,25 @@ export default {
|
|||||||
// 班次基础信息列表
|
// 班次基础信息列表
|
||||||
list: [],
|
list: [],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
this.$auth.hasPermi('base:energy-quantity-manual:create')
|
||||||
? {
|
? {
|
||||||
type: 'meterReading',
|
type: 'meterReading',
|
||||||
btnName: '抄表'
|
btnName: '抄表'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
this.$auth.hasPermi('base:energy-quantity-manual:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑'
|
btnName: '编辑'
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
this.$auth.hasPermi('base:energy-quantity-manual:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除'
|
btnName: '删除'
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
].filter((v)=>v),
|
].filter((v) => v),
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@ -209,10 +185,10 @@ export default {
|
|||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.$modal.confirm('是否确认导出').then(() => {
|
this.$modal.confirm('是否确认导出').then(() => {
|
||||||
return energyQuantityManualExport({...this.queryParams});
|
return energyQuantityManualExport({ energyTypeId: this.queryParams.energyTypeId, recordTime: this.queryParams.recordTime });
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$download.excel(response, '能源报表.xls');
|
this.$download.excel(response, '能源报表.xls');
|
||||||
}).catch(() => {})
|
}).catch(() => { })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
@ -281,13 +257,13 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
console.log(row.id)
|
console.log(row.id)
|
||||||
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除能源类型为"' + row.energyType + '"的数据项?').then(function () {
|
||||||
return energyQuantityManualDelete({id: row.id});
|
return energyQuantityManualDelete({ id: row.id });
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,27 +2,12 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:selectWidth="55" :max-height="tableH" @selection-change="selectChange" />
|
||||||
:limit="queryParams.pageSize"
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:table-props="tableProps"
|
@pagination="getList" />
|
||||||
:table-data="list"
|
|
||||||
:selectWidth="55"
|
|
||||||
:max-height="tableH"
|
|
||||||
@selection-change="selectChange"
|
|
||||||
/>
|
|
||||||
<pagination
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -71,7 +56,8 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'energyTypeId'
|
param: 'energyTypeId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
@ -129,7 +115,7 @@ export default {
|
|||||||
let arr = location.href.split('?')[1].split('&')
|
let arr = location.href.split('?')[1].split('&')
|
||||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
} else {
|
} else {
|
||||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
this.formConfig[1].defaultSelect = [Date.now() - 7 * 24 * 3600000, Date.now()]
|
||||||
}
|
}
|
||||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
@ -146,7 +132,7 @@ export default {
|
|||||||
let arr = location.href.split('?')[1].split('&')
|
let arr = location.href.split('?')[1].split('&')
|
||||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
} else {
|
} else {
|
||||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
this.formConfig[1].defaultSelect = [Date.now() - 7 * 24 * 3600000, Date.now()]
|
||||||
}
|
}
|
||||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
|
@ -16,10 +16,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.unit" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ENERGY_UNIT)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -28,9 +25,9 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="计价方式" prop="pricingMethod">
|
<el-form-item label="计价方式" prop="pricingMethod">
|
||||||
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.pricingMethod" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="时间段" :value= '0' ></el-option>
|
<el-option label="时间段" :value='0'></el-option>
|
||||||
<el-option label="使用量" :value= '1' ></el-option>
|
<el-option label="使用量" :value='1'></el-option>
|
||||||
<el-option label="固定价位" :value= '2' ></el-option>
|
<el-option label="固定价位" :value='2'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -38,56 +35,33 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 2">
|
<el-col :span="12" v-show="form.pricingMethod === 2">
|
||||||
<el-form-item label="单价(元)" prop="pricingMethod">
|
<el-form-item label="单价(元)" prop="pricingMethod">
|
||||||
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.singlePrice" :precision="2" :min="0" :max="999999999"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-show="form.pricingMethod === 1">
|
<el-col :span="12" v-show="form.pricingMethod === 1">
|
||||||
<el-form-item label="计量维度" prop="dim">
|
<el-form-item label="计量维度" prop="dim">
|
||||||
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.dim" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option label="月" :value= '4' ></el-option>
|
<el-option label="月" :value='4'></el-option>
|
||||||
<el-option label="年" :value= '5' ></el-option>
|
<el-option label="年" :value='5'></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 0">
|
<el-col :span="24" v-show="form.pricingMethod === 0">
|
||||||
<el-form-item label="时间段" prop="pricingMethod">
|
<el-form-item label="时间段" prop="pricingMethod">
|
||||||
<base-table
|
<base-table :key='timeKye' :table-props="tableProps1" :table-data="tableData1"
|
||||||
:key='timeKye'
|
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick1" @emitFun="inputChange1">
|
||||||
:table-props="tableProps1"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-data="tableData1"
|
@clickBtn="handleClick1" />
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitButtonClick="emitButtonClick1"
|
|
||||||
@emitFun="inputChange1"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick1"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-show="form.pricingMethod === 1">
|
<el-col :span="24" v-show="form.pricingMethod === 1">
|
||||||
<el-form-item label="使用量" prop="pricingMethod">
|
<el-form-item label="使用量" prop="pricingMethod">
|
||||||
<base-table
|
<base-table :key='usedKye' :table-props="tableProps2" :table-data="tableData2"
|
||||||
:key='usedKye'
|
:add-button-show="addButtonShow" @emitButtonClick="emitButtonClick2" @emitFun="inputChange2">
|
||||||
:table-props="tableProps2"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="80" label="操作" :method-list="tableBtn"
|
||||||
:table-data="tableData2"
|
@clickBtn="handleClick2" />
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitButtonClick="emitButtonClick2"
|
|
||||||
@emitFun="inputChange2"
|
|
||||||
>
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="80"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick2"
|
|
||||||
/>
|
|
||||||
</base-table>
|
</base-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -153,9 +127,11 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
unit: '',
|
unit: '',
|
||||||
|
singlePrice: 0,
|
||||||
pricingMethod: 2,
|
pricingMethod: 2,
|
||||||
leaderName: '',
|
dim: '',
|
||||||
push: false
|
push: false,
|
||||||
|
description: ''
|
||||||
},
|
},
|
||||||
isEdit: false, //是否是编辑
|
isEdit: false, //是否是编辑
|
||||||
rules: {
|
rules: {
|
||||||
@ -182,22 +158,24 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = id
|
this.form.id = id
|
||||||
getEnergyType( id ).then((res) => {
|
getEnergyType(id).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.name = res.data.name
|
this.form.name = res.data.name
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.unit = res.data.unit
|
this.form.unit = res.data.unit
|
||||||
this.form.pricingMethod = res.data.pricingMethod
|
this.form.pricingMethod = res.data.pricingMethod
|
||||||
this.form.leaderName = res.data.leaderName
|
this.form.push = res.data.push ? true : false
|
||||||
this.form.push = res.data.push ? true : false
|
this.form.description = res.data.description
|
||||||
switch(this.form.pricingMethod) {
|
switch (this.form.pricingMethod) {
|
||||||
case 0:
|
case 0:
|
||||||
this.tableData1 = res.data.segPriceList || []
|
this.tableData1 = res.data.segPriceList || []
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.tableData2 = res.data.usedPriceList || []
|
this.tableData2 = res.data.usedPriceList || []
|
||||||
|
this.form.dim = res.data.dim
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
this.form.singlePrice = res.data.singlePrice || 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -234,7 +212,7 @@ export default {
|
|||||||
emitButtonClick1() {
|
emitButtonClick1() {
|
||||||
let n = this.tableData1.length
|
let n = this.tableData1.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
|
obj.startTime = n === 0 ? '' : this.tableData1[n - 1].endTime
|
||||||
obj.endTime = ''
|
obj.endTime = ''
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData1.push(obj)
|
this.tableData1.push(obj)
|
||||||
@ -242,7 +220,7 @@ export default {
|
|||||||
emitButtonClick2() {
|
emitButtonClick2() {
|
||||||
let n = this.tableData2.length
|
let n = this.tableData2.length
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
|
obj.startUsed = n === 0 ? 0 : this.tableData2[n - 1].endUsed
|
||||||
obj.endUsed = 0
|
obj.endUsed = 0
|
||||||
obj.price = 0
|
obj.price = 0
|
||||||
this.tableData2.push(obj)
|
this.tableData2.push(obj)
|
||||||
@ -259,7 +237,7 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
switch(this.form.pricingMethod) {
|
switch (this.form.pricingMethod) {
|
||||||
case 0:// 时间段
|
case 0:// 时间段
|
||||||
if (this.tableData1.length === 0) {
|
if (this.tableData1.length === 0) {
|
||||||
this.$modal.msgError('时间段表格数据不能为空')
|
this.$modal.msgError('时间段表格数据不能为空')
|
||||||
@ -289,7 +267,7 @@ export default {
|
|||||||
default:// 固定单价
|
default:// 固定单价
|
||||||
if (!this.form.singlePrice) {
|
if (!this.form.singlePrice) {
|
||||||
this.$modal.msgError('单价有误请检查,请检查')
|
this.$modal.msgError('单价有误请检查,请检查')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
@ -302,11 +280,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
||||||
push:this.form.push ? 1 : 0
|
push: this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -320,11 +298,11 @@ export default {
|
|||||||
unit: this.form.unit,
|
unit: this.form.unit,
|
||||||
pricingMethod: this.form.pricingMethod,
|
pricingMethod: this.form.pricingMethod,
|
||||||
description: this.form.description,
|
description: this.form.description,
|
||||||
dim: this.form.pricingMethod === 1 ? this.form.dim: '',
|
dim: this.form.pricingMethod === 1 ? this.form.dim : '',
|
||||||
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '',
|
||||||
segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [],
|
segPriceList: this.form.pricingMethod === 0 ? this.tableData1 : [],
|
||||||
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [],
|
usedPriceList: this.form.pricingMethod === 1 ? this.tableData2 : [],
|
||||||
push:this.form.push ? 1 : 0
|
push: this.form.push ? 1 : 0
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer title="查看详情" :visible.sync="visible" size="70%">
|
<el-drawer title="查看详情" :visible.sync="visible" size="70%" :show-close='false'>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-row class="topBox">
|
<el-row class="topBox">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
@ -210,8 +210,8 @@ export default {
|
|||||||
mobileCodeTimer: 0,
|
mobileCodeTimer: 0,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
loginType: 'uname',
|
loginType: 'uname',
|
||||||
username: 'admin',
|
username: '',
|
||||||
password: 'admin123',
|
password: '',
|
||||||
captchaVerification: '',
|
captchaVerification: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
mobileCode: '',
|
mobileCode: '',
|
||||||
@ -297,9 +297,9 @@ export default {
|
|||||||
this.handleLogin({});
|
this.handleLogin({});
|
||||||
},
|
},
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = getUsername();
|
// const username = getUsername();
|
||||||
const password = getPassword();
|
// const password = getPassword();
|
||||||
const rememberMe = getRememberMe();
|
// const rememberMe = getRememberMe();
|
||||||
const tenantName = getTenantName();
|
const tenantName = getTenantName();
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
...this.loginForm,
|
...this.loginForm,
|
||||||
|
@ -3,34 +3,35 @@
|
|||||||
<div class="box1">
|
<div class="box1">
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>集团编码: {{orderGroupMsg.code}}</span>
|
<span>集团编码: {{ orderGroupMsg.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
<el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon
|
||||||
|
icon-class="return" /> 返回</el-button>
|
||||||
<div style="padding-left: 14px;">
|
<div style="padding-left: 14px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">订单名称</div>
|
<div class="blodTip">订单名称</div>
|
||||||
<div class="lightTip" :title='orderGroupMsg.name'>{{orderGroupMsg.name}}</div>
|
<div class="lightTip" :title='orderGroupMsg.name'>{{ orderGroupMsg.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品名称</div>
|
<div class="blodTip">产品名称</div>
|
||||||
<div class="lightTip" :title="orderGroupMsg.productName">{{orderGroupMsg.productName}}</div>
|
<div class="lightTip" :title="orderGroupMsg.productName">{{ orderGroupMsg.productName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品规格</div>
|
<div class="blodTip">产品规格</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.specifications}}</div>
|
<div class="lightTip">{{ orderGroupMsg.specifications }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">客户</div>
|
<div class="blodTip">客户</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.customerName}}</div>
|
<div class="lightTip">{{ orderGroupMsg.customerName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">包装要求</div>
|
<div class="blodTip">包装要求</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.PACK_SPEC, orderGroupMsg.packReq)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderGroupMsg.packReq) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">交货时间</div>
|
<div class="blodTip">交货时间</div>
|
||||||
<div class="lightTip">{{ parseTime(orderGroupMsg.deliveTime)}}</div>
|
<div class="lightTip">{{ parseTime(orderGroupMsg.deliveTime) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -40,15 +41,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">计划加工数量</div>
|
<div class="blodTip">计划加工数量</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.planQuantity}}</div>
|
<div class="lightTip">{{ orderGroupMsg.planQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
<div class="blodTip">加工平方数(平方米)</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.planArea}}</div>
|
<div class="lightTip">{{ orderGroupMsg.planArea }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">状态</div>
|
<div class="blodTip">状态</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderGroupMsg.status)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderGroupMsg.status) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际开始时间</div>
|
<div class="blodTip">实际开始时间</div>
|
||||||
@ -62,15 +63,15 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际生产数量</div>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.actualquantity }}</div>
|
<div class="lightTip">{{ orderGroupMsg.actualquantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">完成比%</div>
|
<div class="blodTip">完成比%</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.completeRate}}</div>
|
<div class="lightTip">{{ orderGroupMsg.completeRate }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{orderGroupMsg.nokQuantity}}</div>
|
<div class="lightTip">{{ orderGroupMsg.nokQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -78,21 +79,21 @@
|
|||||||
<div class="box2" v-for="(item, index) in orderMsg" :key='index'>
|
<div class="box2" v-for="(item, index) in orderMsg" :key='index'>
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>厂务订单编码: {{item.code}}</span>
|
<span>厂务订单编码: {{ item.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-left: 14px;">
|
<div style="padding-left: 14px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">订单名称</div>
|
<div class="blodTip">订单名称</div>
|
||||||
<div class="lightTip" :title="item.name">{{item.name}}</div>
|
<div class="lightTip" :title="item.name">{{ item.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品名称</div>
|
<div class="blodTip">产品名称</div>
|
||||||
<div class="lightTip" :title="item.productName">{{item.productName}}</div>
|
<div class="lightTip" :title="item.productName">{{ item.productName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品规格</div>
|
<div class="blodTip">产品规格</div>
|
||||||
<div class="lightTip">{{item.specifications}}</div>
|
<div class="lightTip">{{ item.specifications }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">创建时间</div>
|
<div class="blodTip">创建时间</div>
|
||||||
@ -110,19 +111,19 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">计划加工数量</div>
|
<div class="blodTip">计划加工数量</div>
|
||||||
<div class="lightTip">{{item.planQuantity}}</div>
|
<div class="lightTip">{{ item.planQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
<div class="blodTip">加工平方数(平方米)</div>
|
||||||
<div class="lightTip">{{item.planArea}}</div>
|
<div class="lightTip">{{ item.planArea }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">预计用时(时)</div>
|
<div class="blodTip">预计用时(时)</div>
|
||||||
<div class="lightTip">{{item.expectTime}}</div>
|
<div class="lightTip">{{ item.expectTime }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">状态</div>
|
<div class="blodTip">状态</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, item.status)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, item.status) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际开始时间</div>
|
<div class="blodTip">实际开始时间</div>
|
||||||
@ -136,15 +137,15 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际生产数量</div>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<div class="lightTip">{{item.actualQuantity }}</div>
|
<div class="lightTip">{{ item.actualQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">完成比%</div>
|
<div class="blodTip">完成比%</div>
|
||||||
<div class="lightTip">{{item.completeProp}}</div>
|
<div class="lightTip">{{ item.completeProp }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{item.nokQuantity}}</div>
|
<div class="lightTip">{{ item.nokQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -153,13 +154,8 @@
|
|||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>工单信息</span>
|
<span>工单信息</span>
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps"
|
||||||
:page="queryParams.pageNo"
|
:table-data="item.coreWorkOrderRespVOS || []" :max-height="tableH" />
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="item.coreWorkOrderRespVOS || []"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -192,14 +188,14 @@ const tableProps = [
|
|||||||
filter: publicFormatter('workshop')
|
filter: publicFormatter('workshop')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planQuantity',
|
prop: 'planAssignmentQuantity',
|
||||||
label: '计划加工量',
|
label: '计划分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualQuantity',
|
prop: 'actualAssignmentQuantity',
|
||||||
label: '实际加工量',
|
label: '实际分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualArea',
|
prop: 'actualArea',
|
||||||
@ -266,16 +262,16 @@ export default {
|
|||||||
id: this.orderGroupId
|
id: this.orderGroupId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.orderGroupMsg = res.data
|
this.orderGroupMsg = res.data
|
||||||
if ( res.data.orderIdNum && res.data.orderIdNum > 0) {
|
if (res.data.orderIdNum && res.data.orderIdNum > 0) {
|
||||||
this.orderMsg = res.data.orderDetailVOS
|
this.orderMsg = res.data.orderDetailVOS
|
||||||
}else{
|
} else {
|
||||||
this.orderMsg = []
|
this.orderMsg = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 返回
|
// 返回
|
||||||
returnOrderManage() {
|
returnOrderManage() {
|
||||||
this.$router.push({path: '/order/base/order-group'})
|
this.$router.push({ path: '/order/base/order-group' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -285,43 +281,51 @@ export default {
|
|||||||
height: calc(100vh - 120px - 8px);
|
height: calc(100vh - 120px - 8px);
|
||||||
background-color: rgb(242, 244, 249);
|
background-color: rgb(242, 244, 249);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
.box1, .box2 {
|
|
||||||
|
.box1,
|
||||||
|
.box2 {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
|
|
||||||
.blodTip {
|
.blodTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: rgba(0,0,0,0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightTip {
|
.lightTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(102,102,102,0.75);
|
color: rgba(102, 102, 102, 0.75);
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.box2 {
|
.box2 {
|
||||||
height: 415px;
|
height: 415px;
|
||||||
padding: 12px 16px 0;
|
padding: 12px 16px 0;
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box1 {
|
.box1 {
|
||||||
height: 215px;
|
height: 215px;
|
||||||
padding: 16px 16px 0 16px;
|
padding: 16px 16px 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTitle {
|
.boxTitle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin:0 10px 20px 0;
|
margin: 0 10px 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueTitle {
|
.blueTitle {
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -5,13 +5,10 @@
|
|||||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
||||||
<el-option
|
@change="getWorkOrderMsg">
|
||||||
v-for="item in workOrderList"
|
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -23,12 +20,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in productList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -42,36 +35,28 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker
|
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="planStartTime"
|
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="计划完成时间">
|
||||||
<el-date-picker
|
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="planFinishTime"
|
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||||
type="datetime"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
style="width: 100%;"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabled="isBind">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||||
|
style="width: 100%;"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -79,18 +64,15 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
<el-select v-model="form.processFlowId" placeholder="请选择" :disabled="isBind" style="width: 100%;">
|
||||||
<el-option
|
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in processFlowList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind" @change='selectMethod'>
|
<el-select v-model="form.materialMethod" placeholder="请选择" style="width: 100%;" :disabled="isBind"
|
||||||
|
@change='selectMethod'>
|
||||||
<el-option label="产品基础BOM" :value="1"></el-option>
|
<el-option label="产品基础BOM" :value="1"></el-option>
|
||||||
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
<el-option label="工艺扩展BOM" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -99,10 +81,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -111,11 +90,7 @@
|
|||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in workOrderTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -123,45 +98,39 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联产线" prop="productLineId">
|
<el-form-item label="关联产线" prop="productLineId">
|
||||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
||||||
<el-option
|
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in productLineList"
|
</el-option>
|
||||||
:key="item.id"
|
</el-select>
|
||||||
:label="item.name"
|
</el-form-item>
|
||||||
:value="item.id">
|
</el-col>
|
||||||
</el-option>
|
<el-col :span='6'>
|
||||||
</el-select>
|
<el-form-item label="负责车间" prop="roomNameDict">
|
||||||
</el-form-item>
|
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||||
</el-col>
|
<el-option v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)" :key="item.value" :label="item.label"
|
||||||
<el-col :span='6'>
|
:value="item.value">
|
||||||
<el-form-item label="负责车间" prop="roomNameDict">
|
</el-option>
|
||||||
<el-select v-model="form.roomNameDict" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
</el-select>
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-for="item in getDictDatas(DICT_TYPE.WORK_SHOP)"
|
</el-col>
|
||||||
:key="item.value"
|
<el-col :span='6'>
|
||||||
:label="item.label"
|
<el-form-item label="负责人" prop="workers">
|
||||||
:value="item.value">
|
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||||
</el-option>
|
</el-form-item>
|
||||||
</el-select>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span='6'>
|
||||||
</el-col>
|
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||||
<el-col :span='6'>
|
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999"
|
||||||
<el-form-item label="负责人" prop="workers">
|
style="width: 100%;"></el-input-number>
|
||||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
|
||||||
<el-col :span='6'>
|
|
||||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
|
||||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
import { getProcessFlowList, getWorkOrderCode, orderIssue, getFreeWOlist, getWorkOrderById } from '@/api/base/orderManage'
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
import { getLineAll } from '@/api/base/productionLine'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
@ -202,8 +171,8 @@ export default {
|
|||||||
processFlowList: [],
|
processFlowList: [],
|
||||||
productLineList: [],
|
productLineList: [],
|
||||||
workOrderTypeList: [
|
workOrderTypeList: [
|
||||||
{id: 1,name:'普通'},
|
{ id: 1, name: '普通' },
|
||||||
{id: 2, name:'特殊'}
|
{ id: 2, name: '特殊' }
|
||||||
],
|
],
|
||||||
planStartTime: '',
|
planStartTime: '',
|
||||||
planFinishTime: '',
|
planFinishTime: '',
|
||||||
@ -223,7 +192,7 @@ export default {
|
|||||||
this.form.planProductId = data.planProductId
|
this.form.planProductId = data.planProductId
|
||||||
// this.form.processFlowId = data.processFlowId
|
// this.form.processFlowId = data.processFlowId
|
||||||
// this.form.materialMethod = data.materialMethod
|
// this.form.materialMethod = data.materialMethod
|
||||||
}else{//绑定
|
} else {//绑定
|
||||||
this.isBind = true
|
this.isBind = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -244,7 +213,7 @@ export default {
|
|||||||
this.processFlowList = res.data || []
|
this.processFlowList = res.data || []
|
||||||
})
|
})
|
||||||
// 工单list
|
// 工单list
|
||||||
workOrderList({
|
getFreeWOlist({
|
||||||
status: 1
|
status: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.workOrderList = res.data || []
|
this.workOrderList = res.data || []
|
||||||
@ -252,10 +221,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 物料变动
|
// 物料变动
|
||||||
selectMethod(val) {
|
selectMethod(val) {
|
||||||
if (val === 2 && !this.form.processFlowId ) {
|
if (val === 2 && !this.form.processFlowId) {
|
||||||
this.form.materialMethod = 1
|
this.form.materialMethod = 1
|
||||||
this.$modal.msgError("请先选择关联工艺");
|
this.$modal.msgError("请先选择关联工艺");
|
||||||
}else if (val === 1) {
|
} else if (val === 1) {
|
||||||
this.form.processFlowId = ''
|
this.form.processFlowId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -273,32 +242,32 @@ export default {
|
|||||||
workOrderId: this.form.workOrderId,
|
workOrderId: this.form.workOrderId,
|
||||||
orderId: this.form.orderId,
|
orderId: this.form.orderId,
|
||||||
planAssignmentQuantity: this.form.planAssignmentQuantity
|
planAssignmentQuantity: this.form.planAssignmentQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功")
|
this.$modal.msgSuccess("操作成功")
|
||||||
this.$emit('addWorkOrderSubmit')
|
this.$emit('addWorkOrderSubmit')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{// 新增工单
|
} else {// 新增工单
|
||||||
this.$refs['addWorkOrder'].validate((valid) => {
|
this.$refs['addWorkOrder'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 新增工单
|
// 新增工单
|
||||||
let _this = this
|
let _this = this
|
||||||
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
|
||||||
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
|
||||||
orderIssue({ ..._this.form }).then(res => {
|
orderIssue({ ..._this.form }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
_this.$modal.msgSuccess("操作成功")
|
_this.$modal.msgSuccess("操作成功")
|
||||||
let name = this.form.name
|
let name = this.form.name
|
||||||
_this.$emit('addWorkOrderSubmit')
|
_this.$emit('addWorkOrderSubmit')
|
||||||
// // 询问是否添加预使用主原料
|
// // 询问是否添加预使用主原料
|
||||||
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
// _this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
|
||||||
// _this.$router.push({
|
// _this.$router.push({
|
||||||
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
// path: '/core/core-work-order?workOrderName='+encodeURI(name)
|
||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -319,7 +288,7 @@ export default {
|
|||||||
// 绑定工单,选择工单时获取工单信息
|
// 绑定工单,选择工单时获取工单信息
|
||||||
getWorkOrderMsg() {
|
getWorkOrderMsg() {
|
||||||
if (this.form.workOrderId) {
|
if (this.form.workOrderId) {
|
||||||
getWorkOrderById({id:this.form.workOrderId}).then(res => {
|
getWorkOrderById({ id: this.form.workOrderId }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.planProductId = res.data.planProductId
|
this.form.planProductId = res.data.planProductId
|
||||||
@ -345,7 +314,7 @@ export default {
|
|||||||
getSpecifications(val) {
|
getSpecifications(val) {
|
||||||
for (let i of this.productList) {
|
for (let i of this.productList) {
|
||||||
if (i.id === val) {
|
if (i.id === val) {
|
||||||
this.form.specifications = i.specifications
|
this.form.specifications = i.specifications
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="orderDetailData">
|
<div class="orderDetailData">
|
||||||
<div v-show="!isSingle" style="position: relative;padding-right: 90px;">
|
<div v-show="!isSingle" style="position: relative;padding-right: 90px;">
|
||||||
<TopTab :orderIdList='orderIdList' :orderId="orderId" @emitFun='toggleName'/>
|
<TopTab :orderIdList='orderIdList' :orderId="orderId" @emitFun='toggleName' />
|
||||||
<el-button type="primary" plain size="small" style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
<el-button type="primary" plain size="small"
|
||||||
|
style="position: absolute;right: 0; top: 0;height: 48px;font-size: 14px;" @click="returnOrderManage"><svg-icon
|
||||||
|
icon-class="return" /> 返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="box1">
|
<div class="box1">
|
||||||
<div class="boxTitle">
|
<div class="boxTitle">
|
||||||
<span class="blueTitle"></span>
|
<span class="blueTitle"></span>
|
||||||
<span>订单编码: {{orderMsg.code}}</span>
|
<span>订单编码: {{ orderMsg.code }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button v-show="isSingle" type="primary" plain size="small" style="float: right;" @click="returnOrderManage"><svg-icon icon-class="return"/> 返回</el-button>
|
<el-button v-show="isSingle" type="primary" plain size="small" style="float: right;"
|
||||||
|
@click="returnOrderManage"><svg-icon icon-class="return" /> 返回</el-button>
|
||||||
<div style="padding-left: 14px;">
|
<div style="padding-left: 14px;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">订单名</div>
|
<div class="blodTip">订单名</div>
|
||||||
<div class="lightTip">{{orderMsg.name}}</div>
|
<div class="lightTip">{{ orderMsg.name }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品名称</div>
|
<div class="blodTip">产品名称</div>
|
||||||
<div class="lightTip">{{orderMsg.productName}}</div>
|
<div class="lightTip">{{ orderMsg.productName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">产品规格</div>
|
<div class="blodTip">产品规格</div>
|
||||||
<div class="lightTip">{{orderMsg.specifications}}</div>
|
<div class="lightTip">{{ orderMsg.specifications }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">创建时间</div>
|
<div class="blodTip">创建时间</div>
|
||||||
@ -40,11 +43,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">计划加工数量</div>
|
<div class="blodTip">计划加工数量</div>
|
||||||
<div class="lightTip">{{orderMsg.planQuantity}}</div>
|
<div class="lightTip">{{ orderMsg.planQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">加工平方数(平方米)</div>
|
<div class="blodTip">加工平方数(平方米)</div>
|
||||||
<div class="lightTip">{{orderMsg.planArea}}</div>
|
<div class="lightTip">{{ orderMsg.planArea }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">预计用时(时)</div>
|
<div class="blodTip">预计用时(时)</div>
|
||||||
@ -52,7 +55,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">状态</div>
|
<div class="blodTip">状态</div>
|
||||||
<div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status)}}</div>
|
<div class="lightTip">{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际开始时间</div>
|
<div class="blodTip">实际开始时间</div>
|
||||||
@ -66,15 +69,15 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">实际生产数量</div>
|
<div class="blodTip">实际生产数量</div>
|
||||||
<div class="lightTip">{{orderMsg.actualQuantity }}</div>
|
<div class="lightTip">{{ orderMsg.actualQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">完成比%</div>
|
<div class="blodTip">完成比%</div>
|
||||||
<div class="lightTip">{{orderMsg.completeProp}}</div>
|
<div class="lightTip">{{ orderMsg.completeProp }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='4'>
|
<el-col :span='4'>
|
||||||
<div class="blodTip">废片数量</div>
|
<div class="blodTip">废片数量</div>
|
||||||
<div class="lightTip">{{orderMsg.nokQuantity}}</div>
|
<div class="lightTip">{{ orderMsg.nokQuantity }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -85,13 +88,8 @@
|
|||||||
<span>工单信息</span>
|
<span>工单信息</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps1"
|
||||||
:page="queryParams.pageNo"
|
:table-data="list1" :max-height="tableH" />
|
||||||
:limit="queryParams.pageSize"
|
|
||||||
:table-props="tableProps1"
|
|
||||||
:table-data="list1"
|
|
||||||
:max-height="tableH"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -125,14 +123,14 @@ const tableProps1 = [
|
|||||||
filter: publicFormatter('workshop')
|
filter: publicFormatter('workshop')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planQuantity',
|
prop: 'planAssignmentQuantity',
|
||||||
label: '计划加工量',
|
label: '计划分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualQuantity',
|
prop: 'actualAssignmentQuantity',
|
||||||
label: '实际加工量',
|
label: '实际分配数量',
|
||||||
width: 100
|
width: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualArea',
|
prop: 'actualArea',
|
||||||
@ -193,13 +191,13 @@ export default {
|
|||||||
processFlowName: ''
|
processFlowName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{ TopTab },
|
components: { TopTab },
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(510) / 2
|
this.tableH = this.tableHeight(510) / 2
|
||||||
})
|
})
|
||||||
if (this.$route.query.orderIdString && this.$route.query.orderIdString!=='undefined') {
|
if (this.$route.query.orderIdString && this.$route.query.orderIdString !== 'undefined') {
|
||||||
getOrderList({ids:this.$route.query.orderIdString}).then(res => {
|
getOrderList({ ids: this.$route.query.orderIdString }).then(res => {
|
||||||
this.orderIdList = res.data.map(item => {
|
this.orderIdList = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@ -211,7 +209,7 @@ export default {
|
|||||||
})
|
})
|
||||||
this.isSingle = false
|
this.isSingle = false
|
||||||
console.log('aaaaa')
|
console.log('aaaaa')
|
||||||
}else{
|
} else {
|
||||||
this.orderId = this.$route.query.orderId
|
this.orderId = this.$route.query.orderId
|
||||||
this.isSingle = true
|
this.isSingle = true
|
||||||
this.getMsg()
|
this.getMsg()
|
||||||
@ -253,40 +251,48 @@ export default {
|
|||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
.orderDetailData {
|
.orderDetailData {
|
||||||
background-color: rgb(242, 244, 249);
|
background-color: rgb(242, 244, 249);
|
||||||
.box1, .box2{
|
|
||||||
|
.box1,
|
||||||
|
.box2 {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box2 {
|
.box2 {
|
||||||
height: calc(100vh - 351px);
|
height: calc(100vh - 351px);
|
||||||
padding: 12px 16px 0;
|
padding: 12px 16px 0;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box1 {
|
.box1 {
|
||||||
height: 215px;
|
height: 215px;
|
||||||
padding: 16px 16px 0 16px;
|
padding: 16px 16px 0 16px;
|
||||||
|
|
||||||
.blodTip {
|
.blodTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: rgba(0,0,0,0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightTip {
|
.lightTip {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(102,102,102,0.75);
|
color: rgba(102, 102, 102, 0.75);
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTitle {
|
.boxTitle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin:0 10px 20px 0;
|
margin: 0 10px 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blueTitle {
|
.blueTitle {
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -107,7 +107,8 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inspectionInfoList',
|
prop: 'inspectionInfoList',
|
||||||
label: '检测内容',
|
label: '检测内容',
|
||||||
|
showOverflowtooltip: true,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
@ -171,7 +172,7 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.urlOptions.deleteURL(id).then(({ data }) => {
|
this.urlOptions.deleteURL(data.id).then(({ data }) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "操作成功",
|
message: "操作成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:53:32
|
* @Date: 2024-01-30 10:53:32
|
||||||
* @LastEditTime: 2024-02-23 15:16:35
|
* @LastEditTime: 2024-03-15 14:07:15
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<el-col :span="12" style="border-left: 1px solid #ccc">
|
<el-col :span="12" style="border-left: 1px solid #ccc">
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
||||||
<span style="">选择工序</span>
|
<span style="">选择工段</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
<BomSelection ref="materialsBomList" :key="materialsBomList.equipmentId + 'materialsBomList'"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-30 10:52:01
|
* @Date: 2024-01-30 10:52:01
|
||||||
* @LastEditTime: 2024-02-01 14:43:53
|
* @LastEditTime: 2024-03-15 14:06:55
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -64,7 +64,7 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList" /> -->
|
@pagination="getList" /> -->
|
||||||
|
|
||||||
<base-dialog dialogTitle="选择产线工序" :dialogVisible="open" width="45%" @close="cancel" @cancel="cancel"
|
<base-dialog dialogTitle="选择产线工段" :dialogVisible="open" width="45%" @close="cancel" @cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form ref="dataForm" :model="dataForm" label-width="120px" :inline="true" class="demo-form-inline">
|
<el-form ref="dataForm" :model="dataForm" label-width="120px" :inline="true" class="demo-form-inline">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-08 13:46:17
|
* @Date: 2023-12-08 13:46:17
|
||||||
* @LastEditTime: 2024-03-12 14:54:05
|
* @LastEditTime: 2024-03-15 14:54:38
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -246,7 +246,9 @@ export default {
|
|||||||
dataRule: {
|
dataRule: {
|
||||||
// code: [{ required: true, message: "设备物料编码不能为空", trigger: "blur" }],
|
// code: [{ required: true, message: "设备物料编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "设备物料名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "设备物料名称不能为空", trigger: "blur" }],
|
||||||
equipmentId: [{ required: true, message: "设备名称不能为空", trigger: "change" }],
|
equipmentId: [{ required: true, message: "设备名称不能为空", trigger: "change" }],
|
||||||
|
checkResult: [{ required: true, message: "判定结果不能为空", trigger: "change" }],
|
||||||
|
|
||||||
// : [{ required: true, message: "产品类型不能为空", trigger: "change" }],
|
// : [{ required: true, message: "产品类型不能为空", trigger: "change" }],
|
||||||
// processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
|
// processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
|
||||||
}
|
}
|
||||||
@ -405,7 +407,7 @@ export default {
|
|||||||
getSupplierList().then(res => {
|
getSupplierList().then(res => {
|
||||||
this.supplierList = res.data
|
this.supplierList = res.data
|
||||||
})
|
})
|
||||||
const res = await getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL)
|
const res = await getDictDatas(this.DICT_TYPE.MATERIAL_GRADE)
|
||||||
console.log('111', res)
|
console.log('111', res)
|
||||||
this.gradeList = res
|
this.gradeList = res
|
||||||
},
|
},
|
||||||
|
@ -145,7 +145,7 @@ export default {
|
|||||||
width: 180,
|
width: 180,
|
||||||
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
},
|
},
|
||||||
{ prop: 'typeName', label: '类型名称', },
|
{ prop: 'typeName', label: '检测类型', },
|
||||||
{ prop: 'content', label: '检测内容', },
|
{ prop: 'content', label: '检测内容', },
|
||||||
{ prop: 'code', label: '检测编码', },
|
{ prop: 'code', label: '检测编码', },
|
||||||
{ prop: 'remark', label: '备注', },
|
{ prop: 'remark', label: '备注', },
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="30%">
|
width="40%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-03-01 10:33:48
|
* @LastEditTime: 2024-03-15 14:31:10
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="工单号" prop="workOrderId">
|
<el-form-item label="工单号" prop="workOrderId">
|
||||||
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
<el-select v-model="dataForm.workOrderId" placeholder="请选择工单号">
|
||||||
@ -22,7 +22,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="报废时间" prop="logTime">
|
<el-form-item label="报废时间" prop="logTime">
|
||||||
<el-date-picker v-model="dataForm.logTime" type="datetime" value-format="timestamp" placeholder="选择日期">
|
<el-date-picker style="width: 100%;" v-model="dataForm.logTime" type="datetime" value-format="timestamp" placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -130,17 +130,16 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
// this.getCurrentTime()
|
// this.getCurrentTime()
|
||||||
this.getWorksectionById()
|
// this.dataForm.logTime = new Date()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCurrentTime() {
|
// getCurrentTime() {
|
||||||
// new Date().Format("yyyy-MM-dd HH:mm:ss")
|
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||||
this.dataForm.logTime = new Date()
|
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||||
// this.dataForm.logTime = year + "-" + month + "-" + day;
|
// // console.log(this.dataForm.logTime);
|
||||||
console.log(this.dataForm.logTime);
|
// },
|
||||||
},
|
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList()
|
const res = await getList()
|
||||||
this.typeList = res.data
|
this.typeList = res.data
|
||||||
getWorkOrderList().then((res) => {
|
getWorkOrderList().then((res) => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-02-28 09:51:25
|
* @Date: 2024-02-28 09:51:25
|
||||||
* @LastEditTime: 2024-03-08 13:46:46
|
* @LastEditTime: 2024-03-15 14:34:29
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -24,10 +24,25 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.dataForm.logTime = this.format(new Date().getTime())
|
||||||
|
console.log(this.dataForm.logTime);
|
||||||
},
|
},
|
||||||
activated() {
|
mounted () {
|
||||||
},
|
},
|
||||||
|
// activated() {
|
||||||
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
format(dataString) {
|
||||||
|
//dataString是整数,否则要parseInt转换
|
||||||
|
var time = new Date(dataString);
|
||||||
|
var year = time.getFullYear();
|
||||||
|
var month = time.getMonth() + 1;
|
||||||
|
var day = time.getDate();
|
||||||
|
var hour = time.getHours();
|
||||||
|
var minute = time.getMinutes();
|
||||||
|
var second = time.getSeconds();
|
||||||
|
return year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day) + ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute) + ':' + (second < 10 ? '0' + second : second)
|
||||||
|
},
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || "";
|
this.dataForm.id = id || "";
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
@ -41,6 +56,7 @@ export default {
|
|||||||
console.log(response)
|
console.log(response)
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data
|
||||||
this.dataForm.detId = response.data.detIdList
|
this.dataForm.detId = response.data.detIdList
|
||||||
|
this.getWorksectionById(this.dataForm.lineId)
|
||||||
this.dataForm.logTime = new Date(response.data.logTime)
|
this.dataForm.logTime = new Date(response.data.logTime)
|
||||||
|
|
||||||
// if (this.setData) {
|
// if (this.setData) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2024-03-01 10:18:39
|
* @LastEditTime: 2024-03-15 14:33:12
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -110,6 +110,7 @@ export default {
|
|||||||
name: '自动',
|
name: '自动',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
sectionList:[],
|
||||||
visible:false,
|
visible:false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
@ -138,19 +139,18 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
this.getCurrentTime()
|
// this.getCurrentTime()
|
||||||
// this.getWorksectionById()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// init() {
|
// init() {
|
||||||
// this.dialogVisible = true
|
// this.dialogVisible = true
|
||||||
// },
|
// },
|
||||||
getCurrentTime() {
|
// getCurrentTime() {
|
||||||
// new Date().Format("yyyy-MM-dd HH:mm:ss")
|
// // new Date().Format("yyyy-MM-dd HH:mm:ss")
|
||||||
this.dataForm.logTime = new Date()
|
// this.dataForm.logTime = new Date()
|
||||||
// this.dataForm.logTime = year + "-" + month + "-" + day;
|
// // this.dataForm.logTime = year + "-" + month + "-" + day;
|
||||||
console.log(this.dataForm.logTime);
|
// console.log(this.dataForm.logTime);
|
||||||
},
|
// },
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList()
|
const res = await getList()
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="30%">
|
width="40%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
@ -89,7 +89,9 @@
|
|||||||
// import moment from 'moment';
|
// import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import PieChart from './components/pieChart.vue';
|
import PieChart from './components/pieChart.vue';
|
||||||
|
import {
|
||||||
|
exportEquipmentTraceabilityExcel
|
||||||
|
} from '@/api/quality/deviceParameters';
|
||||||
export default {
|
export default {
|
||||||
name: 'EfficiencyAnalysis',
|
name: 'EfficiencyAnalysis',
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin],
|
||||||
@ -256,7 +258,7 @@ export default {
|
|||||||
// parent: 'dateFilterType',
|
// parent: 'dateFilterType',
|
||||||
// 时间段选择
|
// 时间段选择
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
// label: '时间段',
|
label: '时间段',
|
||||||
dateType: 'daterange',
|
dateType: 'daterange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
@ -284,7 +286,13 @@ export default {
|
|||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
color: 'warning',
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// type: 'separate',
|
// type: 'separate',
|
||||||
// },
|
// },
|
||||||
@ -372,7 +380,24 @@ export default {
|
|||||||
this.trendOpen = true;
|
this.trendOpen = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleExport() {
|
||||||
|
// 处理查询参数
|
||||||
|
let params = { ...this.queryParams };
|
||||||
|
params.pageNo = undefined;
|
||||||
|
params.pageSize = undefined;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认导出设备状态追溯?')
|
||||||
|
.then(() => {
|
||||||
|
this.exportLoading = true;
|
||||||
|
return exportEquipmentTraceabilityExcel(params);
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.$download.excel(response, '设备状态追溯.xls');
|
||||||
|
this.exportLoading = false;
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
async getList() {
|
async getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -404,7 +429,8 @@ export default {
|
|||||||
`${payload.timeday} 23:59:59`,
|
`${payload.timeday} 23:59:59`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
this.handleExport()
|
||||||
this.queryParams.recordTime = null;
|
this.queryParams.recordTime = null;
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-12-01 16:43:10
|
* @LastEditTime: 2024-03-15 15:22:59
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -121,7 +121,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '工单开始时间',
|
label: '时间段',
|
||||||
dateType: 'daterange',
|
dateType: 'daterange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: "yyyy-MM-dd",
|
valueFormat: "yyyy-MM-dd",
|
||||||
|
@ -263,7 +263,7 @@ export default {
|
|||||||
width: 90,
|
width: 90,
|
||||||
prop: 'source',
|
prop: 'source',
|
||||||
label: '来源',
|
label: '来源',
|
||||||
filter: (val) => ['平板端', '网页端'][val],
|
filter: (val) => val == 1 ? '平板端' : '网页端',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
|
// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
|
||||||
@ -457,7 +457,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
let str = this.form.checkPerson.join()
|
let str = this.form.checkPerson ? this.form.checkPerson.join() : null
|
||||||
this.form.checkPerson = str
|
this.form.checkPerson = str
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateQualityInspectionRecord(this.form).then((response) => {
|
updateQualityInspectionRecord(this.form).then((response) => {
|
||||||
|
@ -223,7 +223,7 @@ export default {
|
|||||||
{
|
{
|
||||||
// width: 128,
|
// width: 128,
|
||||||
prop: 'sumScrap',
|
prop: 'sumScrap',
|
||||||
label: '未检测总数',
|
label: '未通过检测总数',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// width: 128,
|
// width: 128,
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-24 15:15:24
|
* @Date: 2024-01-24 15:15:24
|
||||||
* @LastEditTime: 2024-03-13 15:21:30
|
* @LastEditTime: 2024-03-18 16:00:41
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div>
|
<div>
|
||||||
|
<!-- <el-alert title="自定义 close-text" type="warning" close-text="知道了">
|
||||||
|
</el-alert> -->
|
||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||||
<el-form-item label="日" prop="reportTime">
|
<el-form-item label="日" prop="reportTime">
|
||||||
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||||
@ -21,8 +23,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
|
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
|
||||||
@refreshDataList="getDataList" />
|
:type="listQuery.reportType" @refreshDataList="getDataList" />
|
||||||
<!-- <pagination
|
<!-- <pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
@ -37,7 +39,8 @@ import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
|||||||
import inputTable from './inputTable.vue';
|
import inputTable from './inputTable.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
export default {
|
export default {
|
||||||
components: { inputTable },
|
components: { inputTable },
|
||||||
data() {
|
data() {
|
||||||
@ -79,45 +82,75 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
multipliedByHundred(str) {
|
multipliedByHundred(str) {
|
||||||
let floatVal = parseFloat(str);
|
// console.log(str)
|
||||||
if (isNaN(floatVal)) {
|
if (str != 0) {
|
||||||
return 0;
|
let floatVal = parseFloat(str);
|
||||||
|
if (isNaN(floatVal)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
floatVal = Math.round(str * 10000) / 100;
|
||||||
|
let strVal = floatVal.toString();
|
||||||
|
let searchVal = strVal.indexOf('.');
|
||||||
|
if (searchVal < 0) {
|
||||||
|
searchVal = strVal.length;
|
||||||
|
strVal += '.';
|
||||||
|
}
|
||||||
|
while (strVal.length <= searchVal + 2) {
|
||||||
|
strVal += '0';
|
||||||
|
}
|
||||||
|
return parseFloat(strVal);
|
||||||
}
|
}
|
||||||
floatVal = Math.round(str * 10000) / 100;
|
|
||||||
let strVal = floatVal.toString();
|
|
||||||
let searchVal = strVal.indexOf('.');
|
|
||||||
if (searchVal < 0) {
|
|
||||||
searchVal = strVal.length;
|
|
||||||
strVal += '.';
|
|
||||||
}
|
|
||||||
while (strVal.length <= searchVal + 2) {
|
|
||||||
strVal += '0';
|
|
||||||
}
|
|
||||||
return parseFloat(strVal);
|
|
||||||
},
|
},
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true
|
||||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
if (this.listQuery.reportTime.length == 0) {
|
||||||
this.tableData = response.data.filter(item => {
|
this.$message({
|
||||||
this.proLineList.forEach(it => {
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
await this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
|
res.data.forEach((ele, index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
res.data[index].lineName = '合计'
|
||||||
|
this.remark = res.data[index].remark
|
||||||
|
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
res.data.forEach(item => {
|
||||||
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
|
console.log(item)
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
|
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||||
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
|
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||||
|
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.tableData = res.data
|
||||||
|
// this.tableData = response.data.filter(item => {
|
||||||
|
// this.proLineList.forEach(it => {
|
||||||
|
// if (item.lineId === it.id) {
|
||||||
|
// item.lineName = it.name
|
||||||
|
|
||||||
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
|
// }
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
// })
|
||||||
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
// if (item.det === false) {
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
// this.all = {
|
||||||
}
|
// id: item.id,
|
||||||
})
|
// remark: item.remark
|
||||||
if (item.det === false) {
|
// }
|
||||||
this.all = {
|
// }
|
||||||
id: item.id,
|
// return item.det === true
|
||||||
remark: item.remark
|
// });
|
||||||
}
|
this.listQuery.total = res.data.length;
|
||||||
}
|
|
||||||
return item.det === true
|
|
||||||
});
|
|
||||||
this.listQuery.total = response.data.length;
|
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -142,6 +175,9 @@ export default {
|
|||||||
// console.log(val.setHours(7, 0, 0))
|
// console.log(val.setHours(7, 0, 0))
|
||||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||||
// let time = this.format(val.setHours(7, 0, 0))
|
// let time = this.format(val.setHours(7, 0, 0))
|
||||||
|
this.startTimeStamp = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.endTimeStamp = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
|
// console.log(this.listQuery.reportTime);
|
||||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
console.log(this.listQuery.reportTime);
|
console.log(this.listQuery.reportTime);
|
||||||
@ -176,17 +212,33 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '原片生产日报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
}
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩日原片生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-13 14:10:04
|
* @Date: 2023-12-13 14:10:04
|
||||||
* @LastEditTime: 2024-03-13 15:27:43
|
* @LastEditTime: 2024-03-18 09:57:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,10 +9,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button v-if="!edit" size="small" @click="edit = true">编辑</el-button>
|
<el-button v-if="!edit" size="small" @click="edit = true">编辑</el-button>
|
||||||
<el-button v-if="edit" size="small" @click="edit= false">返回</el-button>
|
<el-button v-if="edit" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="data" border show-summary style="width: 100%">
|
<el-table :id="id" :data="data" border style="width: 100%">
|
||||||
<el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
|
<el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
|
||||||
:align="item.align ? item.align : 'left'">
|
:align="item.align ? item.align : 'left'">
|
||||||
<el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
|
<el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
|
||||||
@ -20,14 +20,16 @@
|
|||||||
<el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
|
<el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
||||||
<el-input v-else v-model="scope.row[y.prop]"></el-input>
|
<el-input @change="handleChange" :disabled="y.prop == 'dailyOutputTrend' || y.prop === 'originalGlassStatisticsTrend'
|
||||||
|
|| y.prop === 'actualProductTrend' || y.prop === 'originalGlassPassTrend' || y.prop === 'originalGlassPassNow' || y.prop === 'originalGlassPassHis'
|
||||||
|
" v-else v-model="scope.row[y.prop]"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-input type="textarea" v-model="sum.remark" placeholder="备注" :disabled="!edit"
|
<el-input type="textarea" v-model="remark" placeholder="备注" :disabled="!edit" :autosize="{ minRows: 2, maxRows: 6}">
|
||||||
:autosize="{ minRows: 2, maxRows: 6}"></el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -112,7 +114,7 @@ const cols = [
|
|||||||
label: '本周',
|
label: '本周',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'originalGlassPassHis ',
|
prop: 'originalGlassPassHis',
|
||||||
label: '上周',
|
label: '上周',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -130,6 +132,10 @@ const cols = [
|
|||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default:'exportTable'
|
||||||
|
},
|
||||||
time: {
|
time: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
@ -150,6 +156,7 @@ const cols = [
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cols,
|
cols,
|
||||||
|
remark:null,
|
||||||
edit: false,
|
edit: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -195,16 +202,44 @@ const cols = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReturn() {
|
||||||
|
// this.disabled = true
|
||||||
|
this.edit = false
|
||||||
|
},
|
||||||
|
handleChange(e) {
|
||||||
|
// console.log(q)
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
updateData() {
|
updateData() {
|
||||||
|
let obj = {}
|
||||||
this.data.forEach((ele, index) => {
|
this.data.forEach((ele, index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
this.data[index].lineId = ''
|
||||||
|
this.data[index].remark = this.remark
|
||||||
|
obj = ele
|
||||||
|
delete this.data[index].dailyOutputTrend
|
||||||
|
delete this.data[index].originalGlassStatisticsTrend
|
||||||
|
delete this.data[index].actualProductTrend
|
||||||
|
delete this.data[index].originalGlassPassTrend
|
||||||
|
this.data.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let updateArr = this.data
|
||||||
|
updateArr.forEach((ele, index) => {
|
||||||
delete ele.dailyOutputTrend
|
delete ele.dailyOutputTrend
|
||||||
delete ele.originalGlassStatisticsTrend
|
delete ele.originalGlassStatisticsTrend
|
||||||
delete ele.actualProductTrend
|
delete ele.actualProductTrend
|
||||||
delete ele.originalGlassPassTrend
|
delete ele.originalGlassPassTrend
|
||||||
});
|
});
|
||||||
updateGlass(this.data).then(response => {
|
// this.data.forEach((ele, index) => {
|
||||||
updateGlassRemark(this.sum).then(res => {
|
// delete ele.dailyOutputTrend
|
||||||
|
// delete ele.originalGlassStatisticsTrend
|
||||||
|
// delete ele.actualProductTrend
|
||||||
|
// delete ele.originalGlassPassTrend
|
||||||
|
// });
|
||||||
|
updateGlass(updateArr).then(response => {
|
||||||
|
updateGlassRemark(obj).then(res => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.edit = false;
|
this.edit = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit("refreshDataList");
|
||||||
|
@ -29,7 +29,8 @@ import { parseTime } from '../../core/mixins/code-filter';
|
|||||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||||
import inputTable from './inputTable.vue';
|
import inputTable from './inputTable.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
export default {
|
export default {
|
||||||
components: { inputTable },
|
components: { inputTable },
|
||||||
data() {
|
data() {
|
||||||
@ -72,29 +73,61 @@ export default {
|
|||||||
// console.log(date)
|
// console.log(date)
|
||||||
this.changeTime(date)
|
this.changeTime(date)
|
||||||
// console.log(date.valueOf());
|
// console.log(date.valueOf());
|
||||||
|
},
|
||||||
|
multipliedByHundred(str) {
|
||||||
|
if (str) {
|
||||||
|
let floatVal = parseFloat(str);
|
||||||
|
if (isNaN(floatVal)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
floatVal = Math.round(str * 10000) / 100;
|
||||||
|
let strVal = floatVal.toString();
|
||||||
|
let searchVal = strVal.indexOf('.');
|
||||||
|
if (searchVal < 0) {
|
||||||
|
searchVal = strVal.length;
|
||||||
|
strVal += '.';
|
||||||
|
}
|
||||||
|
while (strVal.length <= searchVal + 2) {
|
||||||
|
strVal += '0';
|
||||||
|
}
|
||||||
|
return parseFloat(strVal);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
if (this.listQuery.reportTime.length == 0) {
|
||||||
this.tableData = response.data.filter(item => {
|
this.$message({
|
||||||
this.proLineList.forEach(it => {
|
message: '请选择时间',
|
||||||
if (item.lineId === it.id) {
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
await this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
|
res.data.forEach((ele, index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
res.data[index].lineName = '合计'
|
||||||
|
this.remark = res.data[index].remark
|
||||||
|
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
res.data.forEach(item => {
|
||||||
|
this.proLineList.forEach(it => {
|
||||||
|
if (item.lineId === it.id) {
|
||||||
|
console.log(item)
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
|
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
})
|
||||||
this.all = {
|
this.tableData = res.data
|
||||||
id: item.id,
|
|
||||||
remark: item.remark
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return item.det === true
|
|
||||||
});
|
|
||||||
this.listQuery.total = response.data.length;
|
this.listQuery.total = response.data.length;
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
@ -165,16 +198,32 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '原片生产周报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩月原片生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,8 @@ import { parseTime } from '../../core/mixins/code-filter';
|
|||||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||||
import inputTable from './inputTable.vue';
|
import inputTable from './inputTable.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
export default {
|
export default {
|
||||||
components: { inputTable },
|
components: { inputTable },
|
||||||
data() {
|
data() {
|
||||||
@ -163,29 +164,61 @@ export default {
|
|||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
multipliedByHundred(str) {
|
||||||
|
if (str) {
|
||||||
|
let floatVal = parseFloat(str);
|
||||||
|
if (isNaN(floatVal)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
floatVal = Math.round(str * 10000) / 100;
|
||||||
|
let strVal = floatVal.toString();
|
||||||
|
let searchVal = strVal.indexOf('.');
|
||||||
|
if (searchVal < 0) {
|
||||||
|
searchVal = strVal.length;
|
||||||
|
strVal += '.';
|
||||||
|
}
|
||||||
|
while (strVal.length <= searchVal + 2) {
|
||||||
|
strVal += '0';
|
||||||
|
}
|
||||||
|
return parseFloat(strVal);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
if (this.listQuery.reportTime.length == 0) {
|
||||||
this.tableData = response.data.filter(item => {
|
this.$message({
|
||||||
this.proLineList.forEach(it => {
|
message: '请选择时间',
|
||||||
if (item.lineId === it.id) {
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
await this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
|
res.data.forEach((ele, index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
res.data[index].lineName = '合计'
|
||||||
|
this.remark = res.data[index].remark
|
||||||
|
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
res.data.forEach(item => {
|
||||||
|
this.proLineList.forEach(it => {
|
||||||
|
if (item.lineId === it.id) {
|
||||||
|
console.log(item)
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
|
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
})
|
||||||
this.all = {
|
this.tableData = res.data
|
||||||
id: item.id,
|
|
||||||
remark: item.remark
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return item.det === true
|
|
||||||
});
|
|
||||||
this.listQuery.total = response.data.length;
|
this.listQuery.total = response.data.length;
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
@ -230,16 +263,32 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '原片生产周报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩周原片生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,8 @@ import { parseTime } from '../../core/mixins/code-filter';
|
|||||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||||
import inputTable from './inputTable.vue';
|
import inputTable from './inputTable.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
export default {
|
export default {
|
||||||
components: { inputTable },
|
components: { inputTable },
|
||||||
data() {
|
data() {
|
||||||
@ -74,29 +75,61 @@ export default {
|
|||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
},
|
},
|
||||||
|
multipliedByHundred(str) {
|
||||||
|
if (str) {
|
||||||
|
let floatVal = parseFloat(str);
|
||||||
|
if (isNaN(floatVal)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
floatVal = Math.round(str * 10000) / 100;
|
||||||
|
let strVal = floatVal.toString();
|
||||||
|
let searchVal = strVal.indexOf('.');
|
||||||
|
if (searchVal < 0) {
|
||||||
|
searchVal = strVal.length;
|
||||||
|
strVal += '.';
|
||||||
|
}
|
||||||
|
while (strVal.length <= searchVal + 2) {
|
||||||
|
strVal += '0';
|
||||||
|
}
|
||||||
|
return parseFloat(strVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
if (this.listQuery.reportTime.length == 0) {
|
||||||
this.tableData = response.data.filter(item => {
|
this.$message({
|
||||||
this.proLineList.forEach(it => {
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
await this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
|
res.data.forEach((ele, index) => {
|
||||||
|
if (ele.det === false) {
|
||||||
|
res.data[index].lineName = '合计'
|
||||||
|
this.remark = res.data[index].remark
|
||||||
|
res.data[index].dailyOutputTrend = res.data[index].dailyOutputTrend != 0 ? this.multipliedByHundred(res.data[index].dailyOutputTrend) + '%' : res.data[index].dailyOutputTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassStatisticsTrend = res.data[index].originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassStatisticsTrend) + '%' : res.data[index].originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].actualProductTrend = res.data[index].actualProductTrend != 0 ? this.multipliedByHundred(res.data[index].actualProductTrend) + '%' : res.data[index].actualProductTrend == 0 ? 0 : undefined
|
||||||
|
res.data[index].originalGlassPassTrend = res.data[index].originalGlassPassTrend != 0 ? this.multipliedByHundred(res.data[index].originalGlassPassTrend) + '%' : res.data[index].originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
res.data.forEach(item => {
|
||||||
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.dailyOutputTrend = item.dailyOutputTrend ? parseFloat((item.dailyOutputTrend * 100).toFixed(2)) + '%' : null
|
console.log(item)
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.lineName = it.name
|
||||||
item.actualProductTrend = item.actualProductTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.dailyOutputTrend = item.dailyOutputTrend != 0 ? this.multipliedByHundred(item.dailyOutputTrend) + '%' : item.dailyOutputTrend == 0 ? 0 : undefined
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? parseFloat((item.originalGlassStatisticsTrend * 100).toFixed(2)) + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend != 0 ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : item.originalGlassStatisticsTrend == 0 ? 0 : undefined
|
||||||
item.lineName = it.name
|
item.actualProductTrend = item.actualProductTrend != 0 ? this.multipliedByHundred(item.actualProductTrend) + '%' : item.actualProductTrend == 0 ? 0 : undefined
|
||||||
}
|
item.originalGlassPassTrend = item.originalGlassPassTrend != 0 ? this.multipliedByHundred(item.originalGlassPassTrend) + '%' : item.originalGlassPassTrend == 0 ? 0 : undefined
|
||||||
})
|
}
|
||||||
if (item.det === false) {
|
})
|
||||||
this.all = {
|
})
|
||||||
id: item.id,
|
this.tableData = res.data
|
||||||
remark: item.remark
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return item.det === true
|
|
||||||
});
|
|
||||||
this.listQuery.total = response.data.length;
|
this.listQuery.total = response.data.length;
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
@ -139,16 +172,32 @@ export default {
|
|||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '原片生产周报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩年原片生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-13 15:28:18
|
* @LastEditTime: 2024-03-18 15:24:10
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="listQuery" class="demo-form-inline">
|
<el-form :inline="true" :model="listQuery" class="blueTip">
|
||||||
<el-form-item label="日" prop="reportTime">
|
<el-form-item label="日" prop="reportTime">
|
||||||
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -17,10 +17,11 @@
|
|||||||
@click="handleExport">导出</el-button>
|
@click="handleExport">导出</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
<el-button v-if="!isSave" size="small" @click="editDataList()">编辑</el-button>
|
||||||
|
<el-button v-if="isSave" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
<el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
|
||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
@ -46,9 +47,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="!disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
|
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend * 100).toFixed(2)) + '%' :
|
||||||
undefined}} </span>
|
undefined}} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -69,10 +70,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
|
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend * 100).toFixed(2)) +
|
||||||
'%' : undefined }} </span>
|
'%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -80,57 +81,75 @@
|
|||||||
<el-table-column prop="missCheckNow" label="今日" align="center">
|
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend * 100).toFixed(2)) + '%' :
|
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
||||||
undefined }} </span>
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率" align="center">
|
||||||
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
||||||
100).toFixed(2)) +
|
100).toFixed(2)) +
|
||||||
'%' : undefined }}
|
'%' : undefined }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<!-- <div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
<span v-else>{{ remark ? remark : '请输入备注' }} </span>
|
||||||
</div>
|
</div> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div style="height: 50px;" class="remark" >
|
||||||
|
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||||
|
|
||||||
@ -157,6 +176,8 @@ import {
|
|||||||
} from '@/api/report/production';
|
} from '@/api/report/production';
|
||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
@ -432,6 +453,10 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReturn() {
|
||||||
|
this.disabled = true
|
||||||
|
this.isSave = false
|
||||||
|
},
|
||||||
format(shijianchuo) {
|
format(shijianchuo) {
|
||||||
//shijianchuo是整数,否则要parseInt转换
|
//shijianchuo是整数,否则要parseInt转换
|
||||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||||
@ -457,23 +482,40 @@ export default {
|
|||||||
// let time = this.format(val.setHours(7, 0, 0))
|
// let time = this.format(val.setHours(7, 0, 0))
|
||||||
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
console.log(this.listQuery.reportTime);
|
this.timeTips = this.listQuery.reportTime[0] + ' - ' + this.listQuery.reportTime[1]
|
||||||
|
// console.log(this.listQuery.reportTime);
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '成品生产月报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩月成品生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
},
|
},
|
||||||
// timeSelect() {
|
// timeSelect() {
|
||||||
// // switch (this.queryParams.timeDim) {
|
// // switch (this.queryParams.timeDim) {
|
||||||
@ -520,6 +562,7 @@ export default {
|
|||||||
editDataList() {
|
editDataList() {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.isSave = true
|
this.isSave = true
|
||||||
|
this.getDataList()
|
||||||
},
|
},
|
||||||
async saveDataList() {
|
async saveDataList() {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
@ -563,14 +606,19 @@ export default {
|
|||||||
// this.listQuery.reportTime[0] = this.transformTime(this.monthValue[0])
|
// this.listQuery.reportTime[0] = this.transformTime(this.monthValue[0])
|
||||||
// // this.queryParams.startTime = this.monthValue[0]
|
// // this.queryParams.startTime = this.monthValue[0]
|
||||||
// this.listQuery.reportTime[1] = this.transformTime(this.monthValue[1])
|
// this.listQuery.reportTime[1] = this.transformTime(this.monthValue[1])
|
||||||
this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
|
// this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
|
||||||
// console.log(this.timeTips);
|
// console.log(this.timeTips);
|
||||||
// } else {
|
// } else {
|
||||||
// // this.$modal.msgError('月范围不能为空')
|
// // this.$modal.msgError('月范围不能为空')
|
||||||
// // return false
|
// // return false
|
||||||
// }
|
// }
|
||||||
|
if (this.listQuery.reportTime.length == 0) {
|
||||||
console.log(this.listQuery);
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/report-auto-production/page',
|
url: '/base/report-auto-production/page',
|
||||||
@ -604,3 +652,19 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/* .blueTip { */
|
||||||
|
/* padding-bottom: 10px; */
|
||||||
|
/* } */
|
||||||
|
.blueTip::before{
|
||||||
|
display: inline-block;
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8PX;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-13 15:29:17
|
* @LastEditTime: 2024-03-18 15:27:53
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="blueTip">
|
||||||
<el-form-item>
|
<el-form-item label="月" prop="reportTime">
|
||||||
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="reportTime" type="month" size="small" @change="changeTime" placeholder="选择月">
|
||||||
end-placeholder="结束日期" clearable :picker-options="pickerOptions" size="small" style='width:350px;'
|
|
||||||
@change="timeSelect">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -19,10 +17,11 @@
|
|||||||
@click="handleExport">导出</el-button>
|
@click="handleExport">导出</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
<el-button v-if="!isSave" size="small" @click="editDataList()">编辑</el-button>
|
||||||
|
<el-button v-if="isSave" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
<el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
|
||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
@ -48,9 +47,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="!disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
|
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) + '%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -71,67 +70,86 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
|
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) + '%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率" align="center">
|
||||||
<el-table-column prop="missCheckNow" label="本月" align="center">
|
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上月" align="center">
|
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
||||||
100).toFixed(2)) +'%' : undefined }} </span>
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率" align="center">
|
||||||
<el-table-column prop="goodProductPassNow" label="本月" align="center">
|
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上月" align="center">
|
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
||||||
100).toFixed(2))+ '%' :undefined }}
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<!-- <div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div style="height: 50px;" class="remark">
|
||||||
|
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||||
|
|
||||||
@ -159,8 +177,10 @@ import {
|
|||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -397,7 +417,8 @@ export default {
|
|||||||
// explainText: undefined,
|
// explainText: undefined,
|
||||||
// remark: undefined,
|
// remark: undefined,
|
||||||
// },
|
// },
|
||||||
// 查询参数
|
// 查询参数
|
||||||
|
reportTime:'',
|
||||||
dataForm: {
|
dataForm: {
|
||||||
// workOrderIdList:undefined,
|
// workOrderIdList:undefined,
|
||||||
// productionId: undefined,
|
// productionId: undefined,
|
||||||
@ -411,7 +432,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCurrentMonthFirst()
|
this.getCurrentMonthFirst()
|
||||||
this.getCurrentMonthLast()
|
// this.getCurrentMonthLast()
|
||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -435,6 +456,11 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReturn() {
|
||||||
|
this.disabled = true
|
||||||
|
this.isSave = false
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
@ -442,32 +468,89 @@ export default {
|
|||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '成品生产月报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩月成品生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
},
|
},
|
||||||
getCurrentMonthFirst() {
|
getCurrentMonthFirst() {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
date.setDate(1)
|
date.setDate(1);
|
||||||
// date.setHours(7, 0, 1)
|
this.reportTime = date
|
||||||
this.monthValue[0] = moment(date).format('YYYY-MM-DD')
|
// console.log(date)
|
||||||
console.log(date)
|
this.changeTime(date)
|
||||||
// console.log(date.valueOf());
|
// console.log(date.valueOf());
|
||||||
},
|
},
|
||||||
getCurrentMonthLast() {
|
changeTime(val) {
|
||||||
const date = new Date();
|
console.log(val)
|
||||||
const currentMonth = date.getMonth();
|
if (val) {
|
||||||
const nextMonth = currentMonth + 1;
|
const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
|
||||||
const nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);
|
const fullyear = val.getFullYear()
|
||||||
const oneDay = 24 * 60 * 60 * 1000;
|
let days = 0
|
||||||
this.monthValue[1] = new Date(nextMonthFirstDay - oneDay)
|
switch (timeStamp) {
|
||||||
|
case 0:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
case 11:
|
||||||
|
days = 31
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 8:
|
||||||
|
case 10:
|
||||||
|
days = 30
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
|
||||||
|
days = 29
|
||||||
|
} else {
|
||||||
|
days = 28
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1, 7, 0, 1).getTime()); //开始时间
|
||||||
|
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 7, 0, 0).getTime()); //结束时间
|
||||||
|
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||||
|
this.timeTips = this.startTimeStamp + '-' + this.endTimeStamp
|
||||||
|
this.dataForm.reportTime[0] = parseTime(new Date(fullyear, timeStamp, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.dataForm.reportTime[1] = parseTime(new Date(fullyear, timeStamp, days, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
|
} else {
|
||||||
|
this.dataForm.reportTime = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//时间戳转为yy-mm-dd hh:mm:ss
|
||||||
|
timeFun(unixtimestamp) {
|
||||||
|
var unixtimestamp = new Date(unixtimestamp);
|
||||||
|
var year = 1900 + unixtimestamp.getYear();
|
||||||
|
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||||
|
var date = "0" + unixtimestamp.getDate();
|
||||||
|
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
||||||
},
|
},
|
||||||
timeSelect() {
|
timeSelect() {
|
||||||
// switch (this.queryParams.timeDim) {
|
// switch (this.queryParams.timeDim) {
|
||||||
@ -566,7 +649,13 @@ export default {
|
|||||||
// this.$modal.msgError('月范围不能为空')
|
// this.$modal.msgError('月范围不能为空')
|
||||||
// return false
|
// return false
|
||||||
}
|
}
|
||||||
|
if (this.dataForm.reportTime.length == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
console.log(this.dataForm);
|
console.log(this.dataForm);
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/report-auto-production/page',
|
url: '/base/report-auto-production/page',
|
||||||
@ -601,3 +690,19 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/* .blueTip { */
|
||||||
|
/* padding-bottom: 10px; */
|
||||||
|
/* } */
|
||||||
|
.blueTip::before{
|
||||||
|
display: inline-block;
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8PX;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-14 13:46:39
|
* @LastEditTime: 2024-03-18 15:26:52
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="blueTip">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -17,10 +17,11 @@
|
|||||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
|
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
<el-button v-if="!isSave" size="small" @click="editDataList()">编辑</el-button>
|
||||||
|
<el-button v-if="isSave" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
<el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
|
||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
@ -39,13 +40,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="规格" align="center">
|
<el-table-column label="规格" align="center">
|
||||||
<el-table-column label="成品" align="center">
|
<el-table-column label="成品" align="center">
|
||||||
<el-table-column :show-header="false">
|
<!-- <el-table-column :show-header="false"> -->
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionL" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionGlassSize" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionL }} </span>
|
<span v-else>{{ scope.row.productionGlassSize }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
<!-- </el-table-column> -->
|
||||||
<el-table-column :show-header="false">
|
<!-- <el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionW }} </span>
|
<span v-else>{{ scope.row.productionW }} </span>
|
||||||
@ -56,25 +57,25 @@
|
|||||||
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionH }} </span>
|
<span v-else>{{ scope.row.productionH }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片" align="center">
|
<el-table-column prop="originalGlassSize" label="原片" align="center">
|
||||||
<el-table-column prop="originalGlassSize">
|
<!-- <el-table-column prop="originalGlassSize"> -->
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
<!-- </el-table-column> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- <el-table-column label="完成良品产量"> -->
|
<!-- <el-table-column label="完成良品产量"> -->
|
||||||
<el-table-column prop="customerId" align="center" label="用户">
|
<el-table-column prop="customerName" align="center" label="用户">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.customerId" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.customerName" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.customerId }} </span>
|
<span v-else>{{ scope.row.customerName }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="packageType" align="center" label="包装形式">
|
<el-table-column prop="packageType" align="center" label="包装形式">
|
||||||
@ -158,12 +159,16 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- </el-table-column> -->
|
<!-- </el-table-column> -->
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<!-- <div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div style="height: 50px;" class="remark">
|
||||||
|
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||||
|
|
||||||
@ -191,6 +196,7 @@ import {
|
|||||||
} from '@/api/report/production';
|
} from '@/api/report/production';
|
||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
@ -453,6 +459,11 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReturn() {
|
||||||
|
this.disabled = true
|
||||||
|
this.isSave = false
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
format(shijianchuo) {
|
format(shijianchuo) {
|
||||||
//shijianchuo是整数,否则要parseInt转换
|
//shijianchuo是整数,否则要parseInt转换
|
||||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||||
@ -562,11 +573,19 @@ export default {
|
|||||||
async getDataList() {
|
async getDataList() {
|
||||||
this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
|
this.timeTips = moment(new Date()).format('YYYY-MM-DD') + ' - ' + moment(new Date().setHours(7, 0, 0) + 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
|
||||||
console.log(this.dataForm);
|
console.log(this.dataForm);
|
||||||
|
if (this.dataForm.reportTime.length == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: 'base/report-auto-delive/listPlus',
|
url: 'base/report-auto-delive/listPlus',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.dataForm
|
params: this.dataForm
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
// let sum = undefined
|
// let sum = undefined
|
||||||
// res.data.list.forEach((ele, index) => {
|
// res.data.list.forEach((ele, index) => {
|
||||||
@ -594,3 +613,19 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/* .blueTip { */
|
||||||
|
/* padding-bottom: 10px; */
|
||||||
|
/* } */
|
||||||
|
.blueTip::before{
|
||||||
|
display: inline-block;
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8PX;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-13 15:29:26
|
* @LastEditTime: 2024-03-18 15:25:48
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="blueTip">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
||||||
:picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
:picker-options="{firstDayOfWeek: 4}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||||
@ -20,10 +20,11 @@
|
|||||||
@click="handleExport">导出</el-button>
|
@click="handleExport">导出</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
<el-button v-if="!isSave" size="small" @click="editDataList()">编辑</el-button>
|
||||||
|
<el-button v-if="isSave" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
<el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
|
||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
@ -49,9 +50,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="!disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
|
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) + '%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -72,67 +73,86 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
|
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) + '%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率" align="center">
|
||||||
<el-table-column prop="missCheckNow" label="本周" align="center">
|
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上周" align="center">
|
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率" align="center">
|
||||||
<el-table-column prop="goodProductPassNow" label="本周" align="center">
|
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上周" align="center">
|
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
||||||
100).toFixed(2)) + '%' :undefined }}
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<!-- <div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div style="height: 50px;" class="remark">
|
||||||
|
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||||
|
|
||||||
@ -162,7 +182,8 @@ import moment from 'moment';
|
|||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -377,6 +398,11 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReturn() {
|
||||||
|
this.disabled = true
|
||||||
|
this.isSave = false
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList()
|
const res = await getCorePLList()
|
||||||
@ -399,6 +425,8 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Tuesday') {
|
} else if (weekday[this.reportTime.getDay()] === 'Tuesday') {
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 5 * 24 * 60 * 60 * 1000)
|
this.startTimeStamp = this.timeFun(new Date().getTime() - 5 * 24 * 60 * 60 * 1000)
|
||||||
@ -406,6 +434,8 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Wednesday') {
|
} else if (weekday[this.reportTime.getDay()] === 'Wednesday') {
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 6 * 24 * 60 * 60 * 1000)
|
this.startTimeStamp = this.timeFun(new Date().getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
@ -413,6 +443,8 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Thursday') {
|
} else if (weekday[this.reportTime.getDay()] === 'Thursday') {
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
|
this.startTimeStamp = this.timeFun(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
|
||||||
@ -420,6 +452,8 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Friday') {
|
} else if (weekday[this.reportTime.getDay()] === 'Friday') {
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 8 * 24 * 60 * 60 * 1000)
|
this.startTimeStamp = this.timeFun(new Date().getTime() - 8 * 24 * 60 * 60 * 1000)
|
||||||
@ -427,6 +461,8 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Saturday') {
|
} else if (weekday[this.reportTime.getDay()] === 'Saturday') {
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 9 * 24 * 60 * 60 * 1000)
|
this.startTimeStamp = this.timeFun(new Date().getTime() - 9 * 24 * 60 * 60 * 1000)
|
||||||
@ -434,6 +470,8 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Sunday') {
|
} else if (weekday[this.reportTime.getDay()] === 'Sunday') {
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 10 * 24 * 60 * 60 * 1000)
|
this.startTimeStamp = this.timeFun(new Date().getTime() - 10 * 24 * 60 * 60 * 1000)
|
||||||
@ -441,21 +479,39 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
|
|
||||||
// this.changeTime(reportTime)
|
// this.changeTime(reportTime)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '成品生产周报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩周成品生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
},
|
},
|
||||||
startWeek() {
|
startWeek() {
|
||||||
// console.log(this.weekValue1);
|
// console.log(this.weekValue1);
|
||||||
@ -532,7 +588,8 @@ export default {
|
|||||||
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 6); //结束时间
|
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 6); //结束时间
|
||||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime())
|
||||||
|
this.timeTips = this.dataForm.reportTime[0] + ' - ' + this.dataForm.reportTime[1]
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.reportTime = []
|
this.dataForm.reportTime = []
|
||||||
}
|
}
|
||||||
@ -551,8 +608,14 @@ export default {
|
|||||||
this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 07:00:01'
|
this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 07:00:01'
|
||||||
// this.queryParams.startTime = this.monthValue[0]
|
// this.queryParams.startTime = this.monthValue[0]
|
||||||
this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 07:00:00'
|
this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 07:00:00'
|
||||||
this.timeTips = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' - ' + moment(this.weekValue2).day(0).format('YYYY-MM-DD')
|
|
||||||
} else {
|
} else {
|
||||||
|
}
|
||||||
|
if (this.dataForm.reportTime.length == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
@ -589,3 +652,19 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/* .blueTip { */
|
||||||
|
/* padding-bottom: 10px; */
|
||||||
|
/* } */
|
||||||
|
.blueTip::before{
|
||||||
|
display: inline-block;
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8PX;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-13 15:29:35
|
* @LastEditTime: 2024-03-18 15:25:54
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="blueTip">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
||||||
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||||
@ -21,10 +21,11 @@
|
|||||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
|
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
<el-button v-if="!isSave" size="small" @click="editDataList()">编辑</el-button>
|
||||||
|
<el-button v-if="isSave" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
<el-table id="exportTable" :data="list" style="width: 100%" :header-cell-style="{
|
||||||
background: '#F2F4F9',
|
background: '#F2F4F9',
|
||||||
color: '#606266'
|
color: '#606266'
|
||||||
}">
|
}">
|
||||||
@ -51,9 +52,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="!disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
|
<span v-else>{{ scope.row.inputTrend ? parseFloat((scope.row.inputTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) + '%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -74,68 +75,86 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
<el-table-column prop="goodProductTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
|
<span v-else>{{ scope.row.goodProductTrend ? parseFloat((scope.row.goodProductTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }} </span>
|
100).toFixed(2)) + '%' : undefined }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原片漏检率" align="center">
|
<el-table-column label="原片漏检率" align="center">
|
||||||
<el-table-column prop="missCheckNow" label="今年" align="center">
|
<el-table-column prop="missCheckNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow ? parseFloat((scope.row.missCheckNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="去年" align="center">
|
<el-table-column prop="missCheckHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis ? parseFloat((scope.row.missCheckHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
<el-table-column prop="missCheckTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
<span v-else>{{ scope.row.missCheckTrend ? parseFloat((scope.row.missCheckTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }}
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="综合良品率" align="center">
|
<el-table-column label="综合良品率" align="center">
|
||||||
<el-table-column prop="goodProductPassNow" label="今年" align="center">
|
<el-table-column prop="goodProductPassNow" label="今日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="去年" align="center">
|
<el-table-column prop="goodProductPassHis" label="昨日" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis *
|
||||||
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
<el-table-column prop="goodProductPassTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="!disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
<span v-else>{{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend *
|
||||||
100).toFixed(2)) + '%' : undefined }}
|
100).toFixed(2)) +
|
||||||
|
'%' : undefined }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
<!-- <div style="height: 50px;" class="remark" slot="append">
|
||||||
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
<el-input placeholder="备注" v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ remark }} </span>
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div style="height: 50px;" class="remark">
|
||||||
|
<el-input placeholder="备注" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||||
|
|
||||||
@ -165,7 +184,8 @@ import moment from 'moment';
|
|||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
|
import * as XLSX from 'xlsx'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
// width: 128,
|
// width: 128,
|
||||||
@ -378,6 +398,11 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReturn() {
|
||||||
|
this.disabled = true
|
||||||
|
this.isSave = false
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList()
|
const res = await getCorePLList()
|
||||||
@ -395,16 +420,32 @@ export default {
|
|||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
var xlsxParam = { raw: true };
|
||||||
params.pageNo = undefined;
|
/* 从表生成工作簿对象 */
|
||||||
params.pageSize = undefined;
|
var wb = XLSX.utils.table_to_book(
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
document.querySelector("#exportTable"),
|
||||||
this.exportLoading = true;
|
xlsxParam
|
||||||
return this.urlOptions.exportURL(params);
|
);
|
||||||
}).then(response => {
|
/* 获取二进制字符串作为输出 */
|
||||||
this.$download.excel(response, '成品生产月报.xls');
|
var wbout = XLSX.write(wb, {
|
||||||
this.exportLoading = false;
|
bookType: "xlsx",
|
||||||
}).catch(() => { });
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"许昌安彩年成品生产汇总.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
},
|
},
|
||||||
// startYear() {
|
// startYear() {
|
||||||
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||||
@ -506,6 +547,13 @@ export default {
|
|||||||
// this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
|
// this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
|
||||||
// this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
|
// this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (this.dataForm.reportTime.length == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
// 执行查询
|
// 执行查询
|
||||||
@ -542,3 +590,19 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/* .blueTip { */
|
||||||
|
/* padding-bottom: 10px; */
|
||||||
|
/* } */
|
||||||
|
.blueTip::before{
|
||||||
|
display: inline-block;
|
||||||
|
content: '';
|
||||||
|
width: 4px;
|
||||||
|
height: 18px;
|
||||||
|
background: #0B58FF;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8PX;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@ -251,7 +251,8 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '负责人',
|
label: '负责人',
|
||||||
prop: 'responsiblePeopleId',
|
prop: 'responsiblePeopleId',
|
||||||
url: '/base/core-worker/listAll',
|
url: '/base/core-worker/workerList',
|
||||||
|
// url: '/base/core-worker/listAll',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -244,7 +244,8 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '负责人',
|
label: '负责人',
|
||||||
prop: 'responsiblePeopleId',
|
prop: 'responsiblePeopleId',
|
||||||
url: '/base/core-worker/listAll',
|
url: '/base/core-worker/workerList',
|
||||||
|
// url: '/base/core-worker/listAll',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
|
@ -120,7 +120,6 @@ import {
|
|||||||
createEquipment,
|
createEquipment,
|
||||||
updateEquipment,
|
updateEquipment,
|
||||||
deleteEquipment,
|
deleteEquipment,
|
||||||
getEquipment,
|
|
||||||
getEquipmentPage,
|
getEquipmentPage,
|
||||||
exportEquipmentExcel,
|
exportEquipmentExcel,
|
||||||
} from '@/api/base/equipment';
|
} from '@/api/base/equipment';
|
||||||
@ -244,7 +243,7 @@ export default {
|
|||||||
select: true,
|
select: true,
|
||||||
label: '负责人',
|
label: '负责人',
|
||||||
prop: 'responsiblePeopleId',
|
prop: 'responsiblePeopleId',
|
||||||
url: '/base/core-worker/listAll',
|
url: '/base/core-worker/workerList',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
|
@ -164,7 +164,10 @@ export default {
|
|||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
const workerlist = await this.$axios(
|
||||||
|
// '/base/core-worker/listAll'
|
||||||
|
'/base/core-worker/workerList'
|
||||||
|
);
|
||||||
if (workerlist.code == 0) {
|
if (workerlist.code == 0) {
|
||||||
inspectorList = inspectorList.concat(
|
inspectorList = inspectorList.concat(
|
||||||
workerlist.data.map((item) => ({
|
workerlist.data.map((item) => ({
|
||||||
|
@ -555,7 +555,10 @@ export default {
|
|||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
const workerlist = await this.$axios(
|
||||||
|
'/base/core-worker/workerList'
|
||||||
|
// '/base/core-worker/listAll'
|
||||||
|
);
|
||||||
if (workerlist.code == 0) {
|
if (workerlist.code == 0) {
|
||||||
inspectorList = inspectorList.concat(
|
inspectorList = inspectorList.concat(
|
||||||
workerlist.data.map((item) => ({
|
workerlist.data.map((item) => ({
|
||||||
|
@ -356,7 +356,8 @@ export default {
|
|||||||
async getRpList() {
|
async getRpList() {
|
||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
const { code, data } = await this.$axios(
|
const { code, data } = await this.$axios(
|
||||||
'/base/core-worker/listAll'
|
'/base/core-worker/workerList'
|
||||||
|
// '/base/core-worker/listAll'
|
||||||
);
|
);
|
||||||
// debugger;
|
// debugger;
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
@ -182,7 +182,10 @@ export default {
|
|||||||
|
|
||||||
async getRpList() {
|
async getRpList() {
|
||||||
this.formLoading = true;
|
this.formLoading = true;
|
||||||
const { code, data } = await this.$axios('/base/core-worker/listAll');
|
const { code, data } = await this.$axios(
|
||||||
|
'/base/core-worker/workerList'
|
||||||
|
// '/base/core-worker/listAll'
|
||||||
|
);
|
||||||
// debugger;
|
// debugger;
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.rpList = data;
|
this.rpList = data;
|
||||||
|
@ -390,7 +390,8 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/base/core-department/listAll',
|
'/base/core-department/listAll',
|
||||||
'/base/core-worker/listAll',
|
'/base/core-worker/workerList',
|
||||||
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
|
@ -639,7 +639,8 @@ export default {
|
|||||||
);
|
);
|
||||||
/** worker */
|
/** worker */
|
||||||
const workerList = await this.$axios({
|
const workerList = await this.$axios({
|
||||||
url: '/base/core-worker/listAll',
|
url: '/base/core-worker/workerList',
|
||||||
|
// url: '/base/core-worker/listAll',
|
||||||
});
|
});
|
||||||
list = list.concat(
|
list = list.concat(
|
||||||
(workerList.data || []).map((item) => ({
|
(workerList.data || []).map((item) => ({
|
||||||
|
@ -326,7 +326,8 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/base/core-department/listAll',
|
'/base/core-department/listAll',
|
||||||
'/base/core-worker/listAll',
|
'/base/core-worker/workerList',
|
||||||
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
|
@ -598,7 +598,8 @@ export default {
|
|||||||
const urls = [
|
const urls = [
|
||||||
'/base/core-production-line/listAll',
|
'/base/core-production-line/listAll',
|
||||||
'/base/core-department/listAll',
|
'/base/core-department/listAll',
|
||||||
'/base/core-worker/listAll',
|
'/base/core-worker/workerList',
|
||||||
|
// '/base/core-worker/listAll',
|
||||||
];
|
];
|
||||||
let res;
|
let res;
|
||||||
switch (source) {
|
switch (source) {
|
||||||
|
Loading…
Reference in New Issue
Block a user