|
|
@ -99,18 +99,6 @@
|
|
|
|
<el-table-column label="胎胚编码" align="center" prop="feCode" width="150"/>
|
|
|
|
<el-table-column label="胎胚编码" align="center" prop="feCode" width="150"/>
|
|
|
|
<el-table-column label="胎胚描述" align="center" prop="feDesc" width="150"/>
|
|
|
|
<el-table-column label="胎胚描述" align="center" prop="feDesc" width="150"/>
|
|
|
|
<el-table-column label="生产工厂" align="center" prop="produceFactory" width="150"/>
|
|
|
|
<el-table-column label="生产工厂" align="center" prop="produceFactory" width="150"/>
|
|
|
|
<!-- <el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"-->
|
|
|
|
|
|
|
|
<!-- width="160">-->
|
|
|
|
|
|
|
|
<!-- <template #default="scope">-->
|
|
|
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
|
|
|
<!-- icon="Edit"-->
|
|
|
|
|
|
|
|
<!-- @click="handleUpdate(scope.row)"-->
|
|
|
|
|
|
|
|
<!-- v-hasPermi="['basetyre:basetyre:edit']"-->
|
|
|
|
|
|
|
|
<!-- >{{ t('option.edit') }}-->
|
|
|
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 分页-->
|
|
|
|
<!-- 分页-->
|
|
|
@ -122,52 +110,11 @@
|
|
|
|
@pagination="getList"
|
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改岗位对话框 -->
|
|
|
|
|
|
|
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
|
|
|
|
|
|
|
<el-form ref="postRef" :model="form" :rules="rules" :label-width=" locale ? '100px':'140px'">
|
|
|
|
|
|
|
|
<el-form-item prop="id" v-if="false">
|
|
|
|
|
|
|
|
<el-input v-model="form.id"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item :label="t('tireManagement.tireNo')" prop="tureCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.tureCode" :placeholder="t('common.pleaseEnter') + t('tireManagement.tireNo')" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="品牌" prop="tureCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.tureCode" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="花纹" prop="tureCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.tureCode" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="规格型号" prop="tureCode">
|
|
|
|
|
|
|
|
<el-input v-model="form.tureCode" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item :label="t('tireManagement.tireSensorID')" prop="sensorId">
|
|
|
|
|
|
|
|
<el-input v-model="form.sensorId" :placeholder="t('common.pleaseEnter') + t('tireManagement.tireSensorID')"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item :label="t('tireManagement.treadDepth')" prop="currentTextureDepth">
|
|
|
|
|
|
|
|
<el-input-number
|
|
|
|
|
|
|
|
v-model="form.currentTextureDepth"
|
|
|
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
|
|
|
:min="0"
|
|
|
|
|
|
|
|
:max="99"
|
|
|
|
|
|
|
|
:step="0.1"
|
|
|
|
|
|
|
|
:precision="2"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitForm">{{ t('option.ok') }}</el-button>
|
|
|
|
|
|
|
|
<el-button @click="cancel">{{ t('option.cancel') }}</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup name="basetyre">
|
|
|
|
<script setup name="basetyre">
|
|
|
|
import {addBasetyre, delBasetyre, getBasetyre, listBasetyre, updateBasetyre} from "@/api/tireManagement/salesData";
|
|
|
|
import {listBasetyre} from "@/api/tireManagement/salesData";
|
|
|
|
|
|
|
|
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
import Cookies from "js-cookie";
|
|
|
@ -182,8 +129,6 @@ const {sys_normal_disable} = proxy.useDict("sys_normal_disable");
|
|
|
|
// 表格数据
|
|
|
|
// 表格数据
|
|
|
|
const postList = ref([]);
|
|
|
|
const postList = ref([]);
|
|
|
|
const dateRange = ref([]);
|
|
|
|
const dateRange = ref([]);
|
|
|
|
// 模态框开关标识
|
|
|
|
|
|
|
|
const open = ref(false);
|
|
|
|
|
|
|
|
// 表格加载状态开关标识
|
|
|
|
// 表格加载状态开关标识
|
|
|
|
const loading = ref(true);
|
|
|
|
const loading = ref(true);
|
|
|
|
// 搜索区域开关标识
|
|
|
|
// 搜索区域开关标识
|
|
|
@ -215,19 +160,13 @@ const queryParams = ref({
|
|
|
|
modifyName: null
|
|
|
|
modifyName: null
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
|
|
|
|
|
|
const rules = {
|
|
|
|
|
|
|
|
tureCode: [{required: true, message: "外胎号不能为空", trigger: "blur"}],
|
|
|
|
|
|
|
|
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
|
|
|
|
|
|
|
|
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表单数据
|
|
|
|
// 表单数据
|
|
|
|
const form = ref({});
|
|
|
|
const form = ref({});
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
/** 查询岗位列表 */
|
|
|
|
function getList() {
|
|
|
|
function getList() {
|
|
|
|
loading.value = true;
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
console.log(proxy.addDateRange(queryParams.value, dateRange.value))
|
|
|
|
listBasetyre(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
|
|
|
listBasetyre(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
|
|
|
|
postList.value = response.rows;
|
|
|
|
postList.value = response.rows;
|
|
|
|
total.value = response.total;
|
|
|
|
total.value = response.total;
|
|
|
@ -236,11 +175,6 @@ function getList() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 取消按钮 */
|
|
|
|
|
|
|
|
function cancel() {
|
|
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 表单重置 */
|
|
|
|
/** 表单重置 */
|
|
|
|
function reset() {
|
|
|
|
function reset() {
|
|
|
@ -292,59 +226,6 @@ function handleSelectionChange(selection) {
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
|
|
|
function handleAdd() {
|
|
|
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
open.value = true;
|
|
|
|
|
|
|
|
title.value = t('tireManagement.addTitle');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
|
|
|
function handleUpdate(row) {
|
|
|
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
const postId = row.id || ids.value;
|
|
|
|
|
|
|
|
getBasetyre(postId).then(response => {
|
|
|
|
|
|
|
|
form.value = response.data;
|
|
|
|
|
|
|
|
open.value = true;
|
|
|
|
|
|
|
|
title.value = t('tireManagement.editTitle');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
|
|
|
function submitForm() {
|
|
|
|
|
|
|
|
proxy.$refs["postRef"].validate(valid => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
if (form.value.id != undefined) {
|
|
|
|
|
|
|
|
updateBasetyre(form.value).then(response => {
|
|
|
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
|
|
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
|
|
getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
addBasetyre(form.value).then(response => {
|
|
|
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
|
|
|
|
|
|
|
|
open.value = false;
|
|
|
|
|
|
|
|
getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
|
|
function handleDelete(row) {
|
|
|
|
|
|
|
|
const postIds = row.id || ids.value;
|
|
|
|
|
|
|
|
proxy.$modal.confirm(t('option.confirmDeletion', {
|
|
|
|
|
|
|
|
key: t('tireManagement.tireFactoryCode'),
|
|
|
|
|
|
|
|
value: postIds
|
|
|
|
|
|
|
|
})).then(function () {
|
|
|
|
|
|
|
|
return delBasetyre(postIds);
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
getList();
|
|
|
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.successfullyDeleted'));
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
function handleExport() {
|
|
|
|
function handleExport() {
|
|
|
@ -352,6 +233,7 @@ function handleExport() {
|
|
|
|
...queryParams.value
|
|
|
|
...queryParams.value
|
|
|
|
}, `post_${new Date().getTime()}.xlsx`);
|
|
|
|
}, `post_${new Date().getTime()}.xlsx`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getList();
|
|
|
|
getList();
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|