Commit 592f830c by sunhaiwei

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

parents a44a3de4 6fab0c74
......@@ -8,8 +8,8 @@ enum Api {
List = '/chaiche/ccbg/list',
Info = '/chaiche/ccbg/info',
MesCheliangBg = '/chaiche/ccbg',
InWarehouse = '/chaiche/ccbg/in-warehouse',
}
......@@ -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';
export interface MesCheliangBgPageParams extends BasicPageParams {
banzu: string;
cllx: string;
cphm: string;
clys: string;
......@@ -14,12 +14,12 @@ export interface MesCheliangBgPageParams extends BasicPageParams {
gzr: string;
cllx: string;
wlzt: string;
gzxm: string;
cphm: string;
clppxh: string;
gzkssj: string;
......
......@@ -4,17 +4,17 @@ import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
* @description: MesCheliangBg分页参数 模型
*/
export interface MesCheliangBgPageParams extends BasicPageParams {
banzu: string;
cphm: string;
gzr: string;
gzkssj: string;
cllx: string;
gzr: string;
gzxm: string;
gzjssj: string;
gzxm: string;
}
/**
......@@ -38,8 +38,6 @@ export interface MesCheliangBgPageModel {
gzjssj: string;
clls: string;
banzu: string;
}
/**
......
......@@ -8,6 +8,8 @@ enum Api {
List = '/scgl/qclywccmx/list',
Info = '/scgl/qclywccmx/info',
MesQclbgRecordOutput = '/scgl/qclywccmx',
Rksq = '/scgl/qclywccmx/commitRk',
Zjsq = '/scgl/qclywccmx/commitZj',
......@@ -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 @@
</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[] = [
},
},
{
field: 'cllx',
label: '车辆类型',
field: 'cphm',
label: '车牌号码',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2017066632836796418' },
labelField: 'name',
datasourceType: 'api',
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: '车牌号码', 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',
mode: 'multiple',
showSearch: true,
......@@ -63,13 +114,13 @@ export const searchFormSchema: FormSchema[] = [
},
{
field: 'wlzt',
label: '物料状态',
field: 'cllx',
label: '车辆类型',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2019657322189856770' },
params: { itemId: '2017066632836796418' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
......@@ -78,32 +129,14 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'gzxm',
label: '工作项目',
field: 'wlzt',
label: '物料状态',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: '/cheliang/gzx',
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',
datasourceType: 'dic',
params: { itemId: '2019657322189856770' },
labelField: 'name',
valueField: 'value',
mode: 'multiple',
showSearch: true,
......@@ -111,62 +144,29 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'cphm',
label: '车牌号码',
field: 'gzxm',
label: '工作项目',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'api',
apiConfig: {
path: '/cheliang/cc-list',
path: '/cheliang/gzx',
method: 'GET',
apiId: '4f46d9d7f8de47c5b744ac88e2ab7eaa',
apiId: 'd31f8fea01274bdf9f1f72464daa59e8',
apiParams: [
{
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'keyword',
value: '',
required: false,
dataType: 'String',
bindType: 'value',
},
],
tableInfo: [{ name: 'keyword', required: false, bindType: '' }],
},
{ 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);",
'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 },
{ 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',
},
{ name: 'label', tableTitle: '工作项', bindField: '', show: true, width: 150 },
],
},
labelField: 'label',
......@@ -513,7 +513,6 @@ export const formProps: FormProps = {
datasourceType: 'dic',
labelField: 'name',
valueField: 'value',
defaultSelect: null,
apiConfig: {
path: 'CodeGeneration/selection',
method: 'GET',
......@@ -531,34 +530,75 @@ export const formProps: FormProps = {
},
},
{
key: 'e17f3687f30f4a2995ea2b07348150b5',
field: 'cllx',
label: '车辆类型',
type: 'select',
component: 'XjrSelect',
key: 'f89a9cedaa7a4f98958d46860ac84ad6',
field: 'cphm',
label: '车牌号码',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
componentProps: {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请选择下拉选择',
placeholder: '请选择车牌号码',
showLabel: 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',
datasourceType: 'api',
labelField: 'label',
valueField: 'value',
pageSize: 10,
assoTitle: '车牌号码',
apiConfig: {
path: 'CodeGeneration/selection',
path: '/cheliang/cc-list',
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: [],
required: false,
......@@ -566,7 +606,6 @@ export const formProps: FormProps = {
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2017066632836796418',
style: { width: '100%' },
},
},
......@@ -695,29 +734,42 @@ export const formProps: FormProps = {
},
},
{
key: '059de967d74b44bba170351aff279c63',
field: 'clzl',
label: '车辆重量(kg)',
type: 'number',
component: 'InputNumber',
key: 'e17f3687f30f4a2995ea2b07348150b5',
field: 'cllx',
label: '车辆类型',
type: 'select',
component: 'XjrSelect',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
span: 7,
defaultValue: '',
min: 0,
step: 1,
disabled: false,
placeholder: '请选择下拉选择',
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,
subTotal: false,
isShow: true,
rules: [],
events: {},
placeholder: '请输入车辆重量(kg)',
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
itemId: '2017066632836796418',
style: { width: '100%' },
},
},
......@@ -895,81 +947,28 @@ export const formProps: FormProps = {
},
},
{
key: 'f89a9cedaa7a4f98958d46860ac84ad6',
field: 'cphm',
label: '车牌号码',
type: 'associate-popup',
component: 'MultiplePopup',
key: '059de967d74b44bba170351aff279c63',
field: 'clzl',
label: '车辆重量(kg)',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
popupType: 'associate',
width: '100%',
span: 7,
placeholder: '请选择车牌号码',
showLabel: true,
defaultValue: '',
min: 0,
step: 1,
disabled: false,
datasourceType: 'api',
labelField: 'label',
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: [],
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: true,
rules: [],
events: {},
isShow: true,
placeholder: '请输入车辆重量(kg)',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......
......@@ -39,12 +39,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆类型',
fieldId: 'cllx',
fieldName: '车牌号码',
fieldId: 'cphm',
isSubTable: false,
showChildren: true,
type: 'select',
key: 'e17f3687f30f4a2995ea2b07348150b5',
type: 'associate-popup',
key: 'f89a9cedaa7a4f98958d46860ac84ad6',
children: [],
options: {},
},
......@@ -123,15 +123,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车辆重量(kg)',
fieldId: 'clzl',
fieldName: '车辆类型',
fieldId: 'cllx',
isSubTable: false,
showChildren: true,
type: 'number',
key: '059de967d74b44bba170351aff279c63',
type: 'select',
key: 'e17f3687f30f4a2995ea2b07348150b5',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -223,14 +222,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '车牌号码',
fieldId: 'cphm',
fieldName: '车辆重量(kg)',
fieldId: 'clzl',
isSubTable: false,
showChildren: true,
type: 'associate-popup',
key: 'f89a9cedaa7a4f98958d46860ac84ad6',
type: 'number',
key: '059de967d74b44bba170351aff279c63',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......
......@@ -46,11 +46,13 @@
</BasicTable>
</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 @@
import { useModal } from '/@/components/Modal';
import CcbgModal from './components/CcbgModal.vue';
import InWarehouse from './components/InWarehouse.vue';
......@@ -103,7 +106,8 @@
const showInWarehouse = ref(false);
const recordId = ref(null);
const listSpliceNum = ref(3); //操作列最先展示几个
......@@ -133,7 +137,7 @@
//展示在列表内的按钮
const actionButtons = ref<string[]>(["view","inWarehouse","delete"]);
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);
})
......@@ -145,7 +149,7 @@
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();
......@@ -159,11 +163,11 @@
const selectedKeys = ref<string[]>([]);
const selectedRowsData = ref<any[]>([]);
const [registerModal, { openModal }] = useModal();
......@@ -262,7 +266,10 @@
});
}
function handleInWarehouse(record: Recordable) {
showInWarehouse.value = true;
recordId.value = record.id;
}
......@@ -310,6 +317,13 @@
handleCloseFormEnableLocke(buttonConfigs.value, 'edit');
}
function handleInWarehouseSuccess() {
showInWarehouse.value = false;
}
function handleInWarehouseCancel() {
showInWarehouse.value = false;
}
function handleView(record: Recordable) {
let info={
......@@ -379,4 +393,4 @@
</style>
\ No newline at end of file
</style>
......@@ -4,14 +4,65 @@ import { uploadApi } from '/@/api/sys/upload';
export const searchFormSchema: FormSchema[] = [
{
field: 'banzu',
label: '班组',
field: 'cphm',
label: '车辆号码',
defaultValue: undefined,
component: 'XjrSelect',
componentProps: {
datasourceType: 'dic',
params: { itemId: '2021042614763266049' },
labelField: 'name',
datasourceType: 'api',
apiConfig: {
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',
mode: 'multiple',
showSearch: true,
......@@ -19,6 +70,17 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'gzr',
label: '排液人',
defaultValue: undefined,
component: 'User',
componentProps: {
suffix: 'ant-design:setting-outlined',
placeholder: '请选择',
},
},
{
field: 'gzkssj',
label: '工作开始时间',
defaultValue: undefined,
......@@ -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',
label: '工作项目',
defaultValue: undefined,
......@@ -101,6 +140,17 @@ export const searchFormSchema: FormSchema[] = [
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[] = [
......@@ -207,19 +257,6 @@ export const columns: BasicColumn[] = [
styleConfig: undefined,
listStyle: undefined,
},
{
resizable: true,
dataIndex: 'banzu',
title: '班组',
componentType: 'radio',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: undefined,
},
];
//表头合并配置
export const headerMergingData = [];
......@@ -417,40 +454,29 @@ export const formProps: FormProps = {
},
},
{
key: '362f762c817749469f47af55832b3363',
field: 'banzu',
label: '班组',
type: 'radio',
component: 'ApiRadioGroup',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
field: 'gzr',
label: '排液人',
type: 'user',
component: 'User',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
span: 7,
width: '100%',
defaultValue: '',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: 'ant-design:setting-outlined',
showLabel: true,
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,
rules: [],
events: {},
multiple: true,
isShow: true,
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
params: { itemId: '2021042614763266049' },
itemId: '2021042614763266049',
style: {},
style: { width: '100%' },
},
},
{
......@@ -559,27 +585,48 @@ export const formProps: FormProps = {
},
},
{
key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
field: 'gzr',
label: '排液人',
type: 'user',
component: 'User',
key: '16549fa420014b3f871e74e4274df5b3',
field: 'gzxm',
label: '工作项目',
type: 'associate-popup',
component: 'MultiplePopup',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
span: 7,
popupType: 'associate',
width: '100%',
defaultValue: '',
placeholder: '请选择人员',
userType: 0,
prefix: '',
suffix: 'ant-design:setting-outlined',
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,
multiple: true,
isShow: true,
rules: [],
events: {},
isShow: true,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
......@@ -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',
field: 'clls',
label: '处理辆数',
......
......@@ -39,14 +39,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '班组',
fieldId: 'banzu',
fieldName: '排液人',
fieldId: 'gzr',
isSubTable: false,
showChildren: true,
type: 'radio',
key: '362f762c817749469f47af55832b3363',
type: 'user',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -105,15 +106,14 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '排液人',
fieldId: 'gzr',
fieldName: '工作项目',
fieldId: 'gzxm',
isSubTable: false,
showChildren: true,
type: 'user',
key: 'b8e63f39708d46cdb64fd9b5e9079dd4',
type: 'associate-popup',
key: '16549fa420014b3f871e74e4274df5b3',
children: [],
options: {},
defaultValue: '',
},
{
required: false,
......@@ -156,22 +156,6 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
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: '处理辆数',
fieldId: 'clls',
isSubTable: false,
......
......@@ -66,7 +66,7 @@
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
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 { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
......@@ -145,7 +145,7 @@
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();
......@@ -223,10 +223,62 @@
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