master
吴普建 12 months ago
parent c472019cc7
commit b4458abf52

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

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

@ -103,8 +103,6 @@ import { useMessage } from 'naive-ui';
import type { FormInst } from 'naive-ui';
// import { createRequiredFormRule } from '@/utils';
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 areaOptions = ref<{ value: string; label: string }[]>([]);
export interface Props {
@ -306,16 +304,6 @@ function locationSelect(_val, item) {
formModel.value.locationCode = item.locationCode;
formModel.value.locationName = item.locationName;
// 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) {
formModel.value.areaId = item.areaId;
@ -325,26 +313,6 @@ function areaSelect(_val, item) {
}
function init() {
// 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>

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

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

@ -102,12 +102,15 @@
:disabled="addForm.id !== null"
></n-input>
</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
v-model:value="addForm.weightMeasureId"
class="w-200px"
:options="primaryOptions"
placeholder="请输入重量单位"
placeholder="请输入单位"
@update:value="weightHandleChange"
/>
</n-form-item-grid-item>
@ -135,7 +138,7 @@
</template>
<script setup lang="tsx">
import type { Ref } from 'vue';
import { getCurrentInstance, Ref } from 'vue';
import { ref, onMounted } from 'vue';
import { useMessage } 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 { useLoading, useWarning, useBoolean } from '~/src/hooks';
const { proxy } = getCurrentInstance() as any;
const { corlor_types } = proxy.useDict('corlor_types');
const message = useMessage();
const { bool: show, setTrue: setShow, setFalse: setHide } = useBoolean();
const { loading, startLoading, endLoading } = useLoading();
@ -171,6 +177,7 @@ const addForm = ref<Item.AddForm>({
specification: '',
weightMeasureId: null,
weightMeasureName: '',
color: '',
ifEnable: 1
});
function cancel() {
@ -184,6 +191,7 @@ function cancel() {
workstageId: null,
workstageName: '',
weightMeasureId: null,
color: '',
weightMeasureName: '',
ifEnable: 1
};
@ -296,6 +304,23 @@ const columns: Ref<DataTableColumns<Item.List>> = ref([
align: 'center',
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: '规格',
align: 'center',

@ -355,7 +355,7 @@ function getListTotal(total, num, price) {
// }
// 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 getTotalPric = computed(() => {

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

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

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

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

Loading…
Cancel
Save