Commit 592f830c by sunhaiwei

Merge remote-tracking branch 'origin/hongshun' into hongshun

parents a44a3de4 6fab0c74
...@@ -8,8 +8,8 @@ enum Api { ...@@ -8,8 +8,8 @@ enum Api {
List = '/chaiche/ccbg/list', List = '/chaiche/ccbg/list',
Info = '/chaiche/ccbg/info', Info = '/chaiche/ccbg/info',
MesCheliangBg = '/chaiche/ccbg', MesCheliangBg = '/chaiche/ccbg',
InWarehouse = '/chaiche/ccbg/in-warehouse',
} }
...@@ -88,6 +88,19 @@ export async function deleteMesCheliangBg(ids: string[], mode: ErrorMessageMode ...@@ -88,6 +88,19 @@ export async function deleteMesCheliangBg(ids: string[], mode: ErrorMessageMode
); );
} }
/**
* @description: 拆车物料入库
*/
export async function inWarehouse(wlList: Recordable[], mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.InWarehouse,
params: wlList,
},
{
errorMessageMode: mode,
},
);
}
...@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -6,7 +6,7 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
export interface MesCheliangBgPageParams extends BasicPageParams { export interface MesCheliangBgPageParams extends BasicPageParams {
banzu: string; banzu: string;
cllx: string; cphm: string;
clys: string; clys: string;
...@@ -14,12 +14,12 @@ export interface MesCheliangBgPageParams extends BasicPageParams { ...@@ -14,12 +14,12 @@ export interface MesCheliangBgPageParams extends BasicPageParams {
gzr: string; gzr: string;
cllx: string;
wlzt: string; wlzt: string;
gzxm: string; gzxm: string;
cphm: string;
clppxh: string; clppxh: string;
gzkssj: string; gzkssj: string;
......
...@@ -4,17 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; ...@@ -4,17 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesCheliangBg分页参数 模型 * @description: MesCheliangBg分页参数 模型
*/ */
export interface MesCheliangBgPageParams extends BasicPageParams { export interface MesCheliangBgPageParams extends BasicPageParams {
banzu: string; cphm: string;
gzr: string;
gzkssj: string; gzkssj: string;
cllx: string; cllx: string;
gzr: string; gzxm: string;
gzjssj: string; gzjssj: string;
gzxm: string;
} }
/** /**
...@@ -38,8 +38,6 @@ export interface MesCheliangBgPageModel { ...@@ -38,8 +38,6 @@ export interface MesCheliangBgPageModel {
gzjssj: string; gzjssj: string;
clls: string; clls: string;
banzu: string;
} }
/** /**
......
...@@ -8,6 +8,8 @@ enum Api { ...@@ -8,6 +8,8 @@ enum Api {
List = '/scgl/qclywccmx/list', List = '/scgl/qclywccmx/list',
Info = '/scgl/qclywccmx/info', Info = '/scgl/qclywccmx/info',
MesQclbgRecordOutput = '/scgl/qclywccmx', MesQclbgRecordOutput = '/scgl/qclywccmx',
Rksq = '/scgl/qclywccmx/commitRk',
Zjsq = '/scgl/qclywccmx/commitZj',
...@@ -88,6 +90,34 @@ export async function deleteMesQclbgRecordOutput(ids: string[], mode: ErrorMessa ...@@ -88,6 +90,34 @@ export async function deleteMesQclbgRecordOutput(ids: string[], mode: ErrorMessa
); );
} }
/**
* @description: 入库
*/
export async function rksqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Rksq,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 质检
*/
export async function zjsqMesProductOutput(params: Recordable, mode: ErrorMessageMode = 'modal') {
return defHttp.post<boolean>(
{
url: Api.Zjsq,
params,
},
{
errorMessageMode: mode,
},
);
}
...@@ -135,4 +135,3 @@ ...@@ -135,4 +135,3 @@
</script> </script>
\ No newline at end of file
<template>
<BasicModal
:height="600"
:width="900"
v-bind="$attrs" @register="registerModal" :title="getTitle"
@ok="handleSubmit" @cancel="handleClose" >
<div style="margin: 20px;">
<a-button type="primary" style="margin-bottom: 10px; margin-right: 10px;" @click="handleAllInWarehouse">全部入库</a-button>
<a-button type="primary" style="margin-bottom: 10px;" @click="handleCancelInWarehouse">取消全部入库</a-button>
<a-table bordered :data-source="dataSource" :columns="columns" :pagination="false" >
<template #bodyCell="{ column, text, record, index }">
<template v-if="column.key === 'index'">
{{ index + 1 }}
</template>
<template v-if="column.dataIndex === 'bcrksl'">
<a-input-number v-model:value="record.bcrksl" :min="0" :max="record.sl - record.yrlsl" />
</template>
</template>
</a-table>
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted, reactive, provide, Ref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import { getMesCheliangBg, inWarehouse } from '/@/api/chaiche/ccbg';
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const formRef = ref();
const isCopy = ref<boolean>(false)
const state = reactive({
formModel: {},
isUpdate: true,
isView: false,
rowId: '',
});
provide<Ref<boolean>>('isCopy', isCopy);
const [registerModal, { closeModal }] = useModalInner(async () => {
});
const props = defineProps(['recordId'])
const getTitle = computed(() => ('拆车物料入库'));
const dataSource = ref([]);
const columns = reactive([
{
title: '序号',
dataIndex: 'index',
key: 'index',
align: 'center',
},
{
title: '物料名称',
dataIndex: 'cpmc',
key: 'cpmc',
},
{
title: '物料编码',
dataIndex: 'cpbh',
key: 'cpbh',
},
{
title: '单位',
dataIndex: 'dw',
key: 'dw',
},
{
title: '总数量',
dataIndex: 'sl',
key: 'sl',
},
{
title: '已入库数量',
dataIndex: 'yrlsl',
key: 'yrlsl',
},
{
title: '本次入库数量',
dataIndex: 'bcrksl',
key: 'bcrksl',
},
]);
onMounted(async () => {
const recordInfo = await getMesCheliangBg(props.recordId);
recordInfo.mesCheliangBgCpList.forEach(item => {
item.bcrksl = 0;
})
dataSource.value = recordInfo.mesCheliangBgCpList;
})
function handleAllInWarehouse() {
dataSource.value.forEach(item => {
item.bcrksl = item.sl - item.yrlsl;
});
}
function handleCancelInWarehouse() {
dataSource.value.forEach(item => {
item.bcrksl = 0;
});
}
async function handleSubmit() {
await inWarehouse(dataSource.value);
notification.success({
message: 'Tip',
description: '入库成功',
});
handleClose();
}
function handleClose() {
emit('success')
}
</script>
...@@ -19,14 +19,65 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -19,14 +19,65 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'cllx', field: 'cphm',
label: '车辆类型', label: '车牌号码',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2017066632836796418' }, apiConfig: {
labelField: 'name', path: '/cheliang/cc-list',
method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', bindField: '', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', bindField: '', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliang_id',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -63,13 +114,13 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -63,13 +114,13 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
field: 'wlzt', field: 'cllx',
label: '物料状态', label: '车辆类型',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'dic',
params: { itemId: '2019657322189856770' }, params: { itemId: '2017066632836796418' },
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
...@@ -78,32 +129,14 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -78,32 +129,14 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'gzxm', field: 'wlzt',
label: '工作项目', label: '物料状态',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'api', datasourceType: 'dic',
apiConfig: { params: { itemId: '2019657322189856770' },
path: '/cheliang/gzx', labelField: 'name',
method: 'GET',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [{ name: 'keyword', required: false, bindType: '' }],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql = \'SELECT id AS `value`, gzx AS label FROM mes_base_gongzuoxiang ?{keyword, WHERE gzx LIKE CONCAT("%", #{keyword}, "%")};\';\r\nreturn db.select(sql);',
outputParams: [
{ name: 'label', tableTitle: '工作项', bindField: '', show: true, width: 150 },
],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -111,62 +144,29 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -111,62 +144,29 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'cphm', field: 'gzxm',
label: '车牌号码', label: '工作项目',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'api', datasourceType: 'api',
apiConfig: { apiConfig: {
path: '/cheliang/cc-list', path: '/cheliang/gzx',
method: 'GET', method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa', apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [ apiParams: [
{ {
key: '1', key: '1',
title: 'Query Params', title: 'Query Params',
tableInfo: [ tableInfo: [{ name: 'keyword', required: false, bindType: '' }],
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
}, },
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);", 'var sql = \'SELECT id AS `value`, gzx AS label FROM mes_base_gongzuoxiang ?{keyword, WHERE gzx LIKE CONCAT("%", #{keyword}, "%")};\';\r\nreturn db.select(sql);',
outputParams: [ outputParams: [
{ name: 'label', tableTitle: '车牌号码', bindField: '', show: true, width: 150 }, { name: 'label', tableTitle: '工作项', bindField: '', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', bindField: '', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliang_id',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
], ],
}, },
labelField: 'label', labelField: 'label',
...@@ -513,7 +513,6 @@ export const formProps: FormProps = { ...@@ -513,7 +513,6 @@ export const formProps: FormProps = {
datasourceType: 'dic', datasourceType: 'dic',
labelField: 'name', labelField: 'name',
valueField: 'value', valueField: 'value',
defaultSelect: null,
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: 'CodeGeneration/selection',
method: 'GET', method: 'GET',
...@@ -531,34 +530,75 @@ export const formProps: FormProps = { ...@@ -531,34 +530,75 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'e17f3687f30f4a2995ea2b07348150b5', key: 'f89a9cedaa7a4f98958d46860ac84ad6',
field: 'cllx', field: 'cphm',
label: '车辆类型', label: '车牌号码',
type: 'select', type: 'associate-popup',
component: 'XjrSelect', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { componentProps: {
popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择下拉选择', placeholder: '请选择车牌号码',
showLabel: true, showLabel: true,
showSearch: false,
isMultiple: false,
clearable: false,
disabled: false, disabled: false,
staticOptions: [ datasourceType: 'api',
{ key: 1, label: 'Option 1', value: 'Option 1' }, labelField: 'label',
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
datasourceType: 'dic',
params: { itemId: '2017066632836796418' },
labelField: 'name',
valueField: 'value', valueField: 'value',
pageSize: 10,
assoTitle: '车牌号码',
apiConfig: { apiConfig: {
path: 'CodeGeneration/selection', path: '/cheliang/cc-list',
method: 'GET', method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7', apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliangId',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
],
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -566,7 +606,6 @@ export const formProps: FormProps = { ...@@ -566,7 +606,6 @@ export const formProps: FormProps = {
events: {}, events: {},
isShow: true, isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2017066632836796418',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -695,29 +734,42 @@ export const formProps: FormProps = { ...@@ -695,29 +734,42 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '059de967d74b44bba170351aff279c63', key: 'e17f3687f30f4a2995ea2b07348150b5',
field: 'clzl', field: 'cllx',
label: '车辆重量(kg)', label: '车辆类型',
type: 'number', type: 'select',
component: 'InputNumber', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
width: '100%', width: '100%',
span: 7, span: 7,
defaultValue: '', placeholder: '请选择下拉选择',
min: 0,
step: 1,
disabled: false,
showLabel: true, showLabel: true,
controls: true, showSearch: false,
isMultiple: false,
clearable: false,
disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
datasourceType: 'dic',
params: { itemId: '2017066632836796418' },
labelField: 'name',
valueField: 'value',
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
subTotal: false,
isShow: true,
rules: [], rules: [],
events: {}, events: {},
placeholder: '请输入车辆重量(kg)', isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2017066632836796418',
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
...@@ -895,81 +947,28 @@ export const formProps: FormProps = { ...@@ -895,81 +947,28 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'f89a9cedaa7a4f98958d46860ac84ad6', key: '059de967d74b44bba170351aff279c63',
field: 'cphm', field: 'clzl',
label: '车牌号码', label: '车辆重量(kg)',
type: 'associate-popup', type: 'number',
component: 'MultiplePopup', component: 'InputNumber',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
popupType: 'associate',
width: '100%', width: '100%',
span: 7, span: 7,
placeholder: '请选择车牌号码', defaultValue: '',
showLabel: true, min: 0,
step: 1,
disabled: false, disabled: false,
datasourceType: 'api', showLabel: true,
labelField: 'label', controls: true,
valueField: 'value',
pageSize: 10,
assoTitle: '车牌号码',
apiConfig: {
path: '/cheliang/cc-list',
method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"var sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.ypy = \"1\" AND cl.sfcj = \"0\" AND cl.jcdj = \"2\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量(kg)',
bindField: 'clzl',
show: true,
width: 150,
component: '059de967d74b44bba170351aff279c63',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'e17f3687f30f4a2995ea2b07348150b5',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliangId',
show: false,
width: 150,
component: 'e1221f5840d7486588dd2c1e086af59d',
},
],
},
dicOptions: [],
required: false, required: false,
subTotal: false,
isShow: true,
rules: [], rules: [],
events: {}, events: {},
isShow: true, placeholder: '请输入车辆重量(kg)',
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
......
...@@ -39,12 +39,12 @@ export const permissionList = [ ...@@ -39,12 +39,12 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '车辆类型', fieldName: '车牌号码',
fieldId: 'cllx', fieldId: 'cphm',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'select', type: 'associate-popup',
key: 'e17f3687f30f4a2995ea2b07348150b5', key: 'f89a9cedaa7a4f98958d46860ac84ad6',
children: [], children: [],
options: {}, options: {},
}, },
...@@ -123,15 +123,14 @@ export const permissionList = [ ...@@ -123,15 +123,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '车辆重量(kg)', fieldName: '车辆类型',
fieldId: 'clzl', fieldId: 'cllx',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'number', type: 'select',
key: '059de967d74b44bba170351aff279c63', key: 'e17f3687f30f4a2995ea2b07348150b5',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -223,14 +222,15 @@ export const permissionList = [ ...@@ -223,14 +222,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '车牌号码', fieldName: '车辆重量(kg)',
fieldId: 'cphm', fieldId: 'clzl',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'associate-popup', type: 'number',
key: 'f89a9cedaa7a4f98958d46860ac84ad6', key: '059de967d74b44bba170351aff279c63',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
......
...@@ -46,11 +46,13 @@ ...@@ -46,11 +46,13 @@
</BasicTable> </BasicTable>
</template> </template>
<CcbgModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/> <CcbgModal @register="registerModal" @success="handleFormSuccess" @cancel="handleFormCancel"/>
<InWarehouse v-if="showInWarehouse" :visible="showInWarehouse" :recordId="recordId"
@success="handleInWarehouseSuccess" @cancel="handleInWarehouseCancel"/>
...@@ -80,11 +82,12 @@ ...@@ -80,11 +82,12 @@
import { useModal } from '/@/components/Modal'; import { useModal } from '/@/components/Modal';
import CcbgModal from './components/CcbgModal.vue'; import CcbgModal from './components/CcbgModal.vue';
import InWarehouse from './components/InWarehouse.vue';
...@@ -103,7 +106,8 @@ ...@@ -103,7 +106,8 @@
const showInWarehouse = ref(false);
const recordId = ref(null);
const listSpliceNum = ref(3); //操作列最先展示几个 const listSpliceNum = ref(3); //操作列最先展示几个
...@@ -133,7 +137,7 @@ ...@@ -133,7 +137,7 @@
//展示在列表内的按钮 //展示在列表内的按钮
const actionButtons = ref<string[]>(["view","inWarehouse","delete"]); const actionButtons = ref<string[]>(["view","inWarehouse","delete"]);
const buttonConfigs = computed(()=>{ const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2018972431831822336","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822337","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2019669737161912320","name":"入库","code":"inWarehouse","icon":"ant-design:home-twotone","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"modal"},{"buttonId":"2018972431831822339","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}] const list = [{"buttonId":"2018972431831822336","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2018972431831822337","name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true},{"buttonId":"2019669737161912320","name":"入库","code":"inWarehouse","icon":"ant-design:home-twotone","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"primary"},{"buttonId":"2018972431831822339","name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]
return filterButtonAuth(list); return filterButtonAuth(list);
}) })
...@@ -145,7 +149,7 @@ ...@@ -145,7 +149,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
}); });
const btnEvent = {view : handleView,add : handleAdd,delete : handleDelete,} const btnEvent = {view : handleView,add : handleAdd,delete : handleDelete,inWarehouse : handleInWarehouse}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -159,11 +163,11 @@ ...@@ -159,11 +163,11 @@
const selectedKeys = ref<string[]>([]); const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]); const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
...@@ -262,7 +266,10 @@ ...@@ -262,7 +266,10 @@
}); });
} }
function handleInWarehouse(record: Recordable) {
showInWarehouse.value = true;
recordId.value = record.id;
}
...@@ -310,6 +317,13 @@ ...@@ -310,6 +317,13 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit'); handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
} }
function handleInWarehouseSuccess() {
showInWarehouse.value = false;
}
function handleInWarehouseCancel() {
showInWarehouse.value = false;
}
function handleView(record: Recordable) { function handleView(record: Recordable) {
let info={ let info={
...@@ -379,4 +393,4 @@ ...@@ -379,4 +393,4 @@
</style> </style>
\ No newline at end of file
...@@ -4,14 +4,65 @@ import { uploadApi } from '/@/api/sys/upload'; ...@@ -4,14 +4,65 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'banzu', field: 'cphm',
label: '班组', label: '车辆号码',
defaultValue: undefined, defaultValue: undefined,
component: 'XjrSelect', component: 'XjrSelect',
componentProps: { componentProps: {
datasourceType: 'dic', datasourceType: 'api',
params: { itemId: '2021042614763266049' }, apiConfig: {
labelField: 'name', path: '/cheliang/py-list',
method: 'GET',
apiId: '81d881afe72d4be3a05677caa75e6342',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
"\r\nvar sql = 'SELECT cl.id, cl.cllx, dic.`name` AS cllx_name, cl.gbzl, cl.cphm AS `value`, cl.cphm AS label ' +\r\n'FROM mes_base_cheliang cl ' +\r\n'LEFT JOIN ' +\r\n'(SELECT detail.`value`, detail.`name` ' +\r\n'FROM xjr_dictionary_item item ' +\r\n'LEFT JOIN xjr_dictionary_detail detail ON detail.item_id = item.id ' +\r\n'WHERE item.`code` = \"cllx\") dic ON cl.cllx = dic.`value` COLLATE utf8mb4_0900_ai_ci ' +\r\n'WHERE cl.sfcj = \"0\" ' +\r\n'?{keyword, AND cl.cphm LIKE CONCAT(\"%\", #{keyword}, \"%\")}'\r\nreturn db.select(sql);",
outputParams: [
{ name: 'label', tableTitle: '车牌号码', bindField: '', show: true, width: 150 },
{ name: 'cllx_name', tableTitle: '车辆类型', bindField: '', show: true, width: 150 },
{
name: 'gbzl',
tableTitle: '车辆重量',
bindField: 'clzl',
show: true,
width: 150,
component: 'ffba6da2c6be427388480ba9dbeda417',
},
{
name: 'cllx',
tableTitle: '',
bindField: 'cllx',
show: false,
width: 150,
component: 'b376e6f92fc94f75ab508964c7406d8a',
},
{
name: 'id',
tableTitle: '',
bindField: 'cheliang_id',
show: false,
width: 150,
component: '6aac9bdc31f74f969e4e94ff13b5a95f',
},
],
},
labelField: 'label',
valueField: 'value', valueField: 'value',
mode: 'multiple', mode: 'multiple',
showSearch: true, showSearch: true,
...@@ -19,6 +70,17 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -19,6 +70,17 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'gzr',
label: '排液人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
field: 'gzkssj', field: 'gzkssj',
label: '工作开始时间', label: '工作开始时间',
defaultValue: undefined, defaultValue: undefined,
...@@ -46,29 +108,6 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -46,29 +108,6 @@ export const searchFormSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'gzr',
label: '排液人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
field: 'gzjssj',
label: '工作结束时间',
defaultValue: undefined,
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
{
field: 'gzxm', field: 'gzxm',
label: '工作项目', label: '工作项目',
defaultValue: undefined, defaultValue: undefined,
...@@ -101,6 +140,17 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -101,6 +140,17 @@ export const searchFormSchema: FormSchema[] = [
getPopupContainer: () => document.body, getPopupContainer: () => document.body,
}, },
}, },
{
field: 'gzjssj',
label: '工作结束时间',
defaultValue: undefined,
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm:ss',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
]; ];
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
...@@ -207,19 +257,6 @@ export const columns: BasicColumn[] = [ ...@@ -207,19 +257,6 @@ export const columns: BasicColumn[] = [
styleConfig: undefined, styleConfig: undefined,
listStyle: undefined, listStyle: undefined,
}, },
{
resizable: true,
dataIndex: 'banzu',
title: '班组',
componentType: 'radio',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
]; ];
//表头合并配置 //表头合并配置
export const headerMergingData = []; export const headerMergingData = [];
...@@ -417,40 +454,29 @@ export const formProps: FormProps = { ...@@ -417,40 +454,29 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '362f762c817749469f47af55832b3363', key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
field: 'banzu', field: 'gzr',
label: '班组', label: '排液人',
type: 'radio', type: 'user',
component: 'ApiRadioGroup', component: 'User',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
span: 7, span: 7,
width: '100%',
defaultValue: '',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: 'ant-design:setting-outlined',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
optionType: 'default',
staticOptions: [
{ key: 1, label: 'option 1', value: 'option 1' },
{ key: 2, label: 'option 2', value: 'option 2' },
{ key: 3, label: 'option 3', value: 'option 3' },
],
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
defaultSelect: null,
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
},
dicOptions: [],
required: false, required: false,
rules: [], multiple: true,
events: {},
isShow: true, isShow: true,
events: {},
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2021042614763266049' }, style: { width: '100%' },
itemId: '2021042614763266049',
style: {},
}, },
}, },
{ {
...@@ -559,27 +585,48 @@ export const formProps: FormProps = { ...@@ -559,27 +585,48 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: 'b8e63f39708d46cdb64fd9b5e9079dd4', key: '16549fa420014b3f871e74e4274df5b3',
field: 'gzr', field: 'gzxm',
label: '排液人', label: '工作项目',
type: 'user', type: 'associate-popup',
component: 'User', component: 'MultiplePopup',
colProps: { span: 24 }, colProps: { span: 24 },
defaultValue: '',
componentProps: { componentProps: {
span: 7, popupType: 'associate',
width: '100%', width: '100%',
defaultValue: '', span: 7,
placeholder: '请选择人员', placeholder: '请选择工作项目',
userType: 0,
prefix: '',
suffix: 'ant-design:setting-outlined',
showLabel: true, showLabel: true,
disabled: false, disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '工作项目',
apiConfig: {
path: '/cheliang/gzx',
method: 'GET',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{ name: 'keyword', required: false, dataType: 'String', bindType: '' },
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql = \'SELECT id AS `value`, gzx AS label FROM mes_base_gongzuoxiang ?{keyword, WHERE gzx LIKE CONCAT("%", #{keyword}, "%")};\';\r\nreturn db.select(sql);',
outputParams: [{ name: 'label', tableTitle: '工作项目', show: true, width: 150 }],
},
dicOptions: [],
required: false, required: false,
multiple: true, rules: [],
isShow: true,
events: {}, events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' }, tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' }, style: { width: '100%' },
}, },
...@@ -644,53 +691,6 @@ export const formProps: FormProps = { ...@@ -644,53 +691,6 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '16549fa420014b3f871e74e4274df5b3',
field: 'gzxm',
label: '工作项目',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
componentProps: {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请选择工作项目',
showLabel: true,
disabled: false,
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '工作项目',
apiConfig: {
path: '/cheliang/gzx',
method: 'GET',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{ name: 'keyword', required: false, dataType: 'String', bindType: '' },
],
},
{ key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' },
],
script:
'var sql = \'SELECT id AS `value`, gzx AS label FROM mes_base_gongzuoxiang ?{keyword, WHERE gzx LIKE CONCAT("%", #{keyword}, "%")};\';\r\nreturn db.select(sql);',
outputParams: [{ name: 'label', tableTitle: '工作项目', show: true, width: 150 }],
},
dicOptions: [],
required: false,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
{
key: '234d3626d0fb4a41a10bf2f562eabce3', key: '234d3626d0fb4a41a10bf2f562eabce3',
field: 'clls', field: 'clls',
label: '处理辆数', label: '处理辆数',
......
...@@ -39,14 +39,15 @@ export const permissionList = [ ...@@ -39,14 +39,15 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '班组', fieldName: '排液人',
fieldId: 'banzu', fieldId: 'gzr',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'radio', type: 'user',
key: '362f762c817749469f47af55832b3363', key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -105,15 +106,14 @@ export const permissionList = [ ...@@ -105,15 +106,14 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '排液人', fieldName: '工作项目',
fieldId: 'gzr', fieldId: 'gzxm',
isSubTable: false, isSubTable: false,
showChildren: true, showChildren: true,
type: 'user', type: 'associate-popup',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4', key: '16549fa420014b3f871e74e4274df5b3',
children: [], children: [],
options: {}, options: {},
defaultValue: '',
}, },
{ {
required: false, required: false,
...@@ -156,22 +156,6 @@ export const permissionList = [ ...@@ -156,22 +156,6 @@ export const permissionList = [
disabled: false, disabled: false,
isSaveTable: false, isSaveTable: false,
tableName: '', tableName: '',
fieldName: '工作项目',
fieldId: 'gzxm',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: '16549fa420014b3f871e74e4274df5b3',
children: [],
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '处理辆数', fieldName: '处理辆数',
fieldId: 'clls', fieldId: 'clls',
isSubTable: false, isSubTable: false,
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
import { Modal } from 'ant-design-vue'; import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesQclbgRecordOutputPage, deleteMesQclbgRecordOutput} from '/@/api/scgl/qclywccmx'; import { getMesQclbgRecordOutputPage, deleteMesQclbgRecordOutput, rksqMesProductOutput, zjsqMesProductOutput } from '/@/api/scgl/qclywccmx';
import { ResizePageWrapper } from '/@/components/Page'; import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
}); });
const btnEvent = {view : handleView,delete : handleDelete,} const btnEvent = {view : handleView,delete : handleDelete,ruku: handleRksq, zhijian: handleZjsq}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
...@@ -223,10 +223,62 @@ ...@@ -223,10 +223,62 @@
btnEvent[code](); btnEvent[code]();
} }
/**
* @description: 入库
*/
async function handleRksq(record: Recordable) {
try {
Modal.confirm({
title: t('提示信息'),
icon: createVNode(ExclamationCircleOutlined),
content: t('是否提交入库申请?'),
okText: t('确认'),
cancelText: t('取消'),
async onOk() {
await rksqMesProductOutput({ id: record.id });
notification.success({
message: t('成功'),
description: '入库申请成功',
});
handleSuccess();
reload();
},
onCancel() {},
});
} catch (error) {
console.error('入库申请失败:', error);
}
}
/**
* @description: 质检
*/
async function handleZjsq(record: Recordable) {
try {
Modal.confirm({
title: t('提示信息'),
icon: createVNode(ExclamationCircleOutlined),
content: t('是否提交质检申请?'),
okText: t('确认'),
cancelText: t('取消'),
async onOk() {
await zjsqMesProductOutput({ id: record.id });
notification.success({
message: t('成功'),
description: '质检申请成功',
});
handleSuccess();
reload();
},
onCancel() {},
});
} catch (error) {
console.error('质检申请失败:', error);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment