master
吴普建 12 months ago
parent c472019cc7
commit b4458abf52

@ -153,6 +153,7 @@ declare namespace Item {
maxStock: string; maxStock: string;
createTime: string; createTime: string;
remark: string; remark: string;
color: string,
ifEnable: number; ifEnable: number;
attr1: string | null; attr1: string | null;
attr2: string | null; attr2: string | null;
@ -179,6 +180,7 @@ declare namespace Item {
workstageId: string | null; workstageId: string | null;
workstageName?: string; workstageName?: string;
itemName: string; itemName: string;
color?: string;
weightMeasureId?: string | null; weightMeasureId?: string | null;
weightMeasureName?: string; weightMeasureName?: string;
ifEnable: number; ifEnable: number;

@ -170,6 +170,7 @@ declare namespace PageRoute {
| 'scm_accessorySupplier' | 'scm_accessorySupplier'
| 'storage' | 'storage'
| 'storage_copperWire' | 'storage_copperWire'
| 'storage_auxiliaryProduceinfo'
| 'storage_earlyWarning' | 'storage_earlyWarning'
| 'storage_enamelCover' | 'storage_enamelCover'
| 'storage_finishedProductInventory' | 'storage_finishedProductInventory'

@ -103,8 +103,6 @@ import { useMessage } from 'naive-ui';
import type { FormInst } from 'naive-ui'; import type { FormInst } from 'naive-ui';
// import { createRequiredFormRule } from '@/utils'; // import { createRequiredFormRule } from '@/utils';
import { editWmsItemRecptLine, addWmsItemRecptLine } from '@/service/api/wms/recptLine'; import { editWmsItemRecptLine, addWmsItemRecptLine } from '@/service/api/wms/recptLine';
import { selectAllWmsStorageLocationList } from '@/service/api/wms/location';
import { selectAllWmsStorageAreaList } from '@/service/api/wms/area';
const locationOptions = ref<{ value: string; label: string }[]>([]); const locationOptions = ref<{ value: string; label: string }[]>([]);
const areaOptions = ref<{ value: string; label: string }[]>([]); const areaOptions = ref<{ value: string; label: string }[]>([]);
export interface Props { export interface Props {
@ -306,16 +304,6 @@ function locationSelect(_val, item) {
formModel.value.locationCode = item.locationCode; formModel.value.locationCode = item.locationCode;
formModel.value.locationName = item.locationName; formModel.value.locationName = item.locationName;
// console.log(formModel.value, item, '------'); // console.log(formModel.value, item, '------');
selectAllWmsStorageAreaList({ locationId: item.locationId }).then(res => {
areaOptions.value = [];
res.data.forEach(listItem => {
areaOptions.value.push({
value: listItem.areaId,
label: listItem.areaName,
...listItem
});
});
});
} }
function areaSelect(_val, item) { function areaSelect(_val, item) {
formModel.value.areaId = item.areaId; formModel.value.areaId = item.areaId;
@ -325,26 +313,6 @@ function areaSelect(_val, item) {
} }
function init() { function init() {
// console.log(formModel.value, '------'); // console.log(formModel.value, '------');
selectAllWmsStorageLocationList({ warehouseId: formModel.value.warehouseId }).then(res => {
locationOptions.value = [];
res.data.forEach(listItem => {
locationOptions.value.push({
value: listItem.locationId,
label: listItem.locationName,
...listItem
});
});
});
selectAllWmsStorageAreaList({ locationId: formModel.value.locationId }).then(res => {
areaOptions.value = [];
res.data.forEach(listItem => {
areaOptions.value.push({
value: listItem.areaId,
label: listItem.areaName,
...listItem
});
});
});
} }
</script> </script>

@ -368,7 +368,7 @@ const columns: Ref<DataTableColumns<wms.recptLineRawType.columns>> = ref([
check-strategy="child" check-strategy="child"
cascade={false} cascade={false}
onUpdateValue={(_value, item) => { onUpdateValue={(_value, item) => {
// row.warehouseId = value; row.warehouseId = _value;
row.areaId = item.id; row.areaId = item.id;
row.locationId = item.pid; row.locationId = item.pid;
row.areaName = item.pname; row.areaName = item.pname;
@ -654,7 +654,7 @@ function getStorage(val) {
function submitInfo() { function submitInfo() {
dataRef.value?.validate(err => { dataRef.value?.validate(err => {
if (!err) { if (!err) {
console.log('校验通过'); console.log('校验通过', data.value);
RecptInfo.value.lineList = data.value; RecptInfo.value.lineList = data.value;
executeWmsItemRecpt(RecptInfo.value).then(res => { executeWmsItemRecpt(RecptInfo.value).then(res => {
// console.log(res); // console.log(res);

@ -45,10 +45,10 @@
<template #right> <template #right>
<div class="flex-center"> <div class="flex-center">
<cx-columns v-model:columns="columns"></cx-columns> <cx-columns v-model:columns="columns"></cx-columns>
<n-button type="warning" size="small" class="ml-5px" @click="synchronization"> <!-- <n-button type="warning" size="small" class="ml-5px" @click="synchronization">-->
<icon-ic-round-plus class="mr-4px text-20px" /> <!-- <icon-ic-round-plus class="mr-4px text-20px" />-->
同步erp客户 <!-- 同步erp客户-->
</n-button> <!-- </n-button>-->
<n-button type="primary" size="small" class="ml-5px" @click="openDialog"> <n-button type="primary" size="small" class="ml-5px" @click="openDialog">
<icon-ic-round-plus class="mr-4px text-20px" /> <icon-ic-round-plus class="mr-4px text-20px" />
新增客户 新增客户
@ -448,7 +448,7 @@ const columns: Ref<DataTableColumns<UserManage.columns>> = ref([
key: 'contact2', key: 'contact2',
width: 120, width: 120,
render: row => { render: row => {
return getGrade(row.contact2); return getGrade(row.contact2 + '');
} }
}, },
@ -590,16 +590,16 @@ function getLeadSource(leadSource: number) {
} }
} }
function getGrade(grade: number) { function getGrade(grade: String) {
switch (grade) { switch (grade) {
case 1: case "1":
return '普通客户'; return '普通客户';
case 2: case "2":
return '重要客户'; return '重要客户';
case 3: case "3":
return '战略客户'; return '战略客户';
default: default:
return ''; return '普通客户';
} }
} }
@ -647,7 +647,7 @@ function getClientTypeText(num: number) {
text: '个人客户' text: '个人客户'
}; };
default: default:
return { text: '' }; return { text: '个人客户' };
} }
} }

@ -102,12 +102,15 @@
:disabled="addForm.id !== null" :disabled="addForm.id !== null"
></n-input> ></n-input>
</n-form-item-grid-item> </n-form-item-grid-item>
<n-form-item-grid-item label="重量单位" :span="11" path="weightMeasureId"> <n-form-item-grid-item label="颜色" :span="11" path="color">
<n-select v-model:value="addForm.color" class="w-200px" :options="corlor_types" placeholder="请选择颜色" ></n-select>
</n-form-item-grid-item>
<n-form-item-grid-item label="单位" :span="11" path="weightMeasureId">
<n-select <n-select
v-model:value="addForm.weightMeasureId" v-model:value="addForm.weightMeasureId"
class="w-200px" class="w-200px"
:options="primaryOptions" :options="primaryOptions"
placeholder="请输入重量单位" placeholder="请输入单位"
@update:value="weightHandleChange" @update:value="weightHandleChange"
/> />
</n-form-item-grid-item> </n-form-item-grid-item>
@ -135,7 +138,7 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
import type { Ref } from 'vue'; import { getCurrentInstance, Ref } from 'vue';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { useMessage } from 'naive-ui'; import { useMessage } from 'naive-ui';
import type { DataTableColumns, FormInst } from 'naive-ui'; import type { DataTableColumns, FormInst } from 'naive-ui';
@ -148,6 +151,9 @@ import { download } from '@/service/request/helpers';
import { dataTableConfig } from '@/config/dataTableConfig'; import { dataTableConfig } from '@/config/dataTableConfig';
import { useLoading, useWarning, useBoolean } from '~/src/hooks'; import { useLoading, useWarning, useBoolean } from '~/src/hooks';
const { proxy } = getCurrentInstance() as any;
const { corlor_types } = proxy.useDict('corlor_types');
const message = useMessage(); const message = useMessage();
const { bool: show, setTrue: setShow, setFalse: setHide } = useBoolean(); const { bool: show, setTrue: setShow, setFalse: setHide } = useBoolean();
const { loading, startLoading, endLoading } = useLoading(); const { loading, startLoading, endLoading } = useLoading();
@ -171,6 +177,7 @@ const addForm = ref<Item.AddForm>({
specification: '', specification: '',
weightMeasureId: null, weightMeasureId: null,
weightMeasureName: '', weightMeasureName: '',
color: '',
ifEnable: 1 ifEnable: 1
}); });
function cancel() { function cancel() {
@ -184,6 +191,7 @@ function cancel() {
workstageId: null, workstageId: null,
workstageName: '', workstageName: '',
weightMeasureId: null, weightMeasureId: null,
color: '',
weightMeasureName: '', weightMeasureName: '',
ifEnable: 1 ifEnable: 1
}; };
@ -296,6 +304,23 @@ const columns: Ref<DataTableColumns<Item.List>> = ref([
align: 'center', align: 'center',
key: 'itemTypeName' key: 'itemTypeName'
}, },
{
title: '颜色',
align: 'center',
key: 'color'
},
{
title: '颜色名称',
key: 'status',
align: 'center',
render: row => {
return <dict-tag options={corlor_types.value} value={row.color}></dict-tag>;
},
width: 110,
ellipsis: {
tooltip: true
}
},
{ {
title: '规格', title: '规格',
align: 'center', align: 'center',

@ -355,7 +355,7 @@ function getListTotal(total, num, price) {
// } // }
// eslint-disable-next-line no-param-reassign, @typescript-eslint/no-unused-vars // eslint-disable-next-line no-param-reassign, @typescript-eslint/no-unused-vars
return total.form.totalPrice.toFixed(4); return total.form.totalPrice;
} }
const editFlag = ref(false); const editFlag = ref(false);
const getTotalPric = computed(() => { const getTotalPric = computed(() => {

@ -126,7 +126,7 @@ const columns: Ref<DataTableColumns<feedRecords.TabelList>> = ref([
} }
}, },
{ {
title: '投料重量', title: '投料数量',
key: 'inputWeight', key: 'inputWeight',
width: 100 width: 100
}, },

@ -120,7 +120,7 @@ const columns: Ref<DataTableColumns<workRecords.TabelList>> = ref([
width: 100 width: 100
}, },
{ {
title: '报工重量', title: '报工数量(副)',
key: 'outputWeight', key: 'outputWeight',
width: 100 width: 100
}, },

@ -265,18 +265,18 @@ const lsColumns: Ref<DataTableColumns<workOrderArrange.lsTabelList>> = ref([
}, },
{ {
title: '重量(kg)', title: '数量(付)',
align: 'center', align: 'center',
width: 100, width: 100,
key: 'weight' key: 'weight'
}, },
{ // {
title: '盘数', // title: '',
align: 'center', // align: 'center',
width: 100, // width: 100,
key: 'discNumber' // key: 'discNumber'
}, // },
{ {
title: '开始时间', title: '开始时间',
align: 'center', align: 'center',

@ -39,14 +39,14 @@
<n-form-item label="规格型号" path="Item.specification" :label-style="labelStyle"> <n-form-item label="规格型号" path="Item.specification" :label-style="labelStyle">
<n-input v-model:value="formValue.specification" placeholder="请输入规格型号" /> <n-input v-model:value="formValue.specification" placeholder="请输入规格型号" />
</n-form-item> </n-form-item>
<n-form-item label="类型" :label-style="labelStyle"> <!-- <n-form-item label="类型" :label-style="labelStyle">-->
<n-select <!-- <n-select-->
v-model:value="formValue.attr1" <!-- v-model:value="formValue.attr1"-->
placeholder="请选择类型" <!-- placeholder="请选择类型"-->
class="w-180px" <!-- class="w-180px"-->
:options="statusList" <!-- :options="statusList"-->
></n-select> <!-- ></n-select>-->
</n-form-item> <!-- </n-form-item>-->
<n-form-item label="入库日期" path="daterange" :label-style="labelStyle"> <n-form-item label="入库日期" path="daterange" :label-style="labelStyle">
<n-date-picker v-model:value="daterange" type="daterange" :format="format" /> <n-date-picker v-model:value="daterange" type="daterange" :format="format" />
</n-form-item> </n-form-item>
@ -216,8 +216,7 @@ function changeType(str: any) {
return 'error'; return 'error';
} }
function getStatus(status: string) { function getStatus(status: string) {
if (status === '0') return '铜丝在制品'; if (status === '0' || status === '1') return '半成品';
if (status === '1') return '漆包在制品';
if (status === '2') return '辅料'; if (status === '2') return '辅料';
if (status === '3') return '成品'; if (status === '3') return '成品';
return ''; return '';
@ -230,12 +229,12 @@ const labelStyle = reactive({
padding: '0 15px', padding: '0 15px',
width: '140px' width: '140px'
}); });
const statusList = ref<Array<{ label: string; value: string }>>([ // const statusList = ref<Array<{ label: string; value: string }>>([
{ label: '铜丝在制品', value: '0' }, // { label: '', value: '0' },
{ label: '漆包在制品', value: '1' }, // { label: '', value: '1' },
{ label: '辅料', value: '2' }, // { label: '', value: '2' },
{ label: '成品', value: '3' } // { label: '', value: '3' }
]); // ]);
const detailLoading = ref<boolean>(false); const detailLoading = ref<boolean>(false);
const detail = ref<boolean>(false); const detail = ref<boolean>(false);
const dialog = useDialog(); const dialog = useDialog();
@ -323,21 +322,21 @@ const columns: DataTableColumns<ApiMaterialStockManagement.materialStock> = [
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ // {
title: '类型', // title: '',
key: 'attr1', // key: 'attr1',
align: 'center', // align: 'center',
width: 160, // width: 160,
render: (row: ApiMaterialStockManagement.materialStock) => { // render: (row: ApiMaterialStockManagement.materialStock) => {
return h( // return h(
NTag, // NTag,
{ // {
type: changeType(row.attr1) // type: changeType(row.attr1)
}, // },
() => getStatus(row.attr1 as string) // () => getStatus(row.attr1 as string)
); // );
} // }
}, // },
{ {
title: '所在仓库', title: '所在仓库',
key: 'warehouseName', key: 'warehouseName',

Loading…
Cancel
Save