update: 更新基础资料对接

This commit is contained in:
admin 2024-03-18 09:52:18 +08:00
parent 6877be2963
commit 8bc4e2f487
10 changed files with 1496 additions and 10 deletions

View File

@ -311,16 +311,40 @@
"navigationBarTitleText": "客户管理" "navigationBarTitleText": "客户管理"
} }
}, },
{
"path": "receiveProduct",
"style": {
"navigationBarTitleText": "收货产品"
}
},
{
"path": "receiveType",
"style": {
"navigationBarTitleText": "收货分类"
}
},
{
"path": "shipmentProduct",
"style": {
"navigationBarTitleText": "出货产品"
}
},
{ {
"path": "stockCard", "path": "stockCard",
"style": { "style": {
"navigationBarTitleText": "库存卡管理" "navigationBarTitleText": "库存卡管理"
} }
}, },
{
"path": "shipmentType",
"style": {
"navigationBarTitleText": "出货分类管理"
}
},
{ {
"path": "supplierType", "path": "supplierType",
"style": { "style": {
"navigationBarTitleText": "供应商分类管理" "navigationBarTitleText": "出货分类"
} }
}, },
{ {
@ -335,12 +359,36 @@
"navigationBarTitleText": "新增供应商" "navigationBarTitleText": "新增供应商"
} }
}, },
{
"path": "components/addShipmentType",
"style": {
"navigationBarTitleText": "新增出货分类"
}
},
{ {
"path": "components/addCustomer", "path": "components/addCustomer",
"style": { "style": {
"navigationBarTitleText": "新增客户" "navigationBarTitleText": "新增客户"
} }
}, },
{
"path": "components/addReceiveProduct",
"style": {
"navigationBarTitleText": "新增收货产品"
}
},
{
"path": "components/addReceiveType",
"style": {
"navigationBarTitleText": "新增收货分类"
}
},
{
"path": "components/addShipmentProduct",
"style": {
"navigationBarTitleText": "新增出货产品"
}
},
{ {
"path": "components/addStockCard", "path": "components/addStockCard",
"style": { "style": {

View File

@ -0,0 +1,229 @@
<template>
<view class="c-card">
<u-form
labelPosition="left"
:model="model1"
:rules="rules"
ref="form"
:labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }"
>
<u-form-item
:prop="`formData[${item.key}]`"
:label="item.name"
:required="item.required"
v-for="(item, index) in formAttrList"
:key="index"
@click="item.fn"
>
<u-textarea
v-if="item.type === 'textarea'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`请输入${item.name}`"
></u-textarea>
<u-input
v-if="item.type === 'select' || item.type === 'input'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`${item.type === 'select' ? '选择' : '输入'}${
item.name
}`"
:clearable="true"
:customStyle="{}"
border="none"
>
<template #suffix>
<text>
{{ item.unit }}
</text>
</template>
</u-input>
<template #right v-if="item.type === 'select'">
<u-icon name="arrow-right"></u-icon>
</template>
</u-form-item>
</u-form>
<block v-for="(item, index) in formAttrList" :key="index">
<u-action-sheet
v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list"
:title="contrlModalParams[item.childKey].title"
:show="contrlModalParams[item.childKey].isShow"
@select="(v: any) => handleSelect(item.childKey, v)"
@close="contrlModalParams[item.childKey].isShow = false"
:closeOnClickAction="true"
></u-action-sheet>
</block>
</view>
<view class="btn-box">
<u-button type="primary" text="保存" @click="save()"></u-button>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
const model1 = reactive<any>({
formData: {},
});
const rules = ref({
"userInfo.userName": {
type: "string",
required: true,
message: "请输入手机号",
trigger: ["blur", "change"],
},
"userInfo.password": {
type: "string",
required: true,
message: "请输入密码",
trigger: ["blur", "change"],
},
});
const contrlModalParams = reactive<any>({
reCategory: {
isShow: false,
title: "标题",
list: [],
},
});
const formAttrList = reactive<any>([
{
name: "收货产品",
key: "reProductsName",
type: "input",
required: true,
unit: "",
},
{
name: "收货分类",
key: "reCategoryName",
type: "select",
childKey: "reCategory",
required: true,
unit: "",
fn: () => {
contrlModalParams.reCategory.isShow = true;
contrlModalParams.reCategory.title = "收货分类";
},
},
{
name: "所属分站",
key: "substationName",
type: "input",
required: true,
unit: "",
},
{
name: "最低价",
key: "minPrice",
type: "input",
required: true,
unit: "",
},
{
name: "最高价",
key: "maxPrice",
type: "input",
required: true,
unit: "",
},
{
name: "常用价格",
key: "commonPrice",
type: "input",
required: true,
unit: "",
},
]);
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "reCategory") {
model1.formData.reCategoryName = v.name;
model1.formData.reCategoryId = v.id;
}
};
const save = () => {
if (model1.formData.id) {
GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/receiveProduct", //
});
}
});
} else {
GoodsApi.addReProducts(model1.formData).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/receiveProduct", //
});
}
});
}
};
const getTypeList = () => {
GoodsApi.getPage({ pageNum: 1, pageSize: 10 }).then((res) => {
if (res.code === 200) {
contrlModalParams.reCategory.list = (res.data as any).list.map(
(item: any) => {
return { ...item, name: item.reCategoryName };
}
);
}
});
};
onMounted(() => {
getTypeList();
});
onLoad((option) => {
//
const title = (option as any).title;
model1.formData = JSON.parse((option as any).item);
if (model1.formData.cardCode) {
model1.formData.stockCardName = model1.formData.cardCode;
}
//
uni.setNavigationBarTitle({
title: title,
});
});
</script>
<style lang="scss" scoped>
.c-card {
background: #ffffff;
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 30rpx 25rpx;
padding: 10rpx 20rpx;
::v-deep .u-form-item {
height: auto;
}
::v-deep .u-form-item + .u-form-item {
border-top: 1rpx solid rgba(233, 233, 233, 0.76);
}
}
.btn-box {
margin-top: 60rpx;
display: flex;
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
bottom: 0rpx;
z-index: 999;
::v-deep button {
border-radius: 43rpx;
}
}
</style>

View File

@ -0,0 +1,180 @@
<template>
<view class="c-card">
<u-form
labelPosition="left"
:model="model1"
:rules="rules"
ref="form"
:labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }"
>
<u-form-item
:prop="`formData[${item.key}]`"
:label="item.name"
:required="item.required"
v-for="(item, index) in formAttrList"
:key="index"
@click="item.fn"
>
<u-textarea
v-if="item.type === 'textarea'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`请输入${item.name}`"
></u-textarea>
<u-input
v-if="item.type === 'select' || item.type === 'input'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`${item.type === 'select' ? '选择' : '输入'}${
item.name
}`"
:clearable="true"
:customStyle="{}"
border="none"
>
<template #suffix>
<text>
{{ item.unit }}
</text>
</template>
</u-input>
<template #right v-if="item.type === 'select'">
<u-icon name="arrow-right"></u-icon>
</template>
</u-form-item>
</u-form>
<block v-for="(item, index) in formAttrList" :key="index">
<u-action-sheet
v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list"
:title="contrlModalParams[item.childKey].title"
:show="contrlModalParams[item.childKey].isShow"
@select="(v: any) => handleSelect(item.childKey, v)"
@close="contrlModalParams[item.childKey].isShow = false"
:closeOnClickAction="true"
></u-action-sheet>
</block>
</view>
<view class="btn-box">
<u-button type="primary" text="保存" @click="save()"></u-button>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
const model1 = reactive<any>({
formData: {},
});
const rules = ref({
"userInfo.userName": {
type: "string",
required: true,
message: "请输入手机号",
trigger: ["blur", "change"],
},
"userInfo.password": {
type: "string",
required: true,
message: "请输入密码",
trigger: ["blur", "change"],
},
});
const contrlModalParams = reactive<any>({
cardType: {
isShow: false,
title: "标题",
list: [{
id: 1,
name: '出库卡'
},{
id: 2,
name: '入库卡'
}],
}
});
const formAttrList = reactive<any>([
{
name: "收货分类",
key: "reCategoryName",
type: "input",
required: true,
},
]);
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "cardType") {
model1.formData.typeName = v.name;
model1.formData.type = v.id;
}
};
const save = () => {
if (model1.formData.id) {
GoodsApi.editReceiveCategory(model1.formData).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/receiveType", //
});
}
});
} else {
GoodsApi.getStockCardList(model1.formData).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/receiveType", //
});
}
});
}
};
onLoad((option) => {
//
const title = (option as any).title;
model1.formData = JSON.parse((option as any).item);
if (model1.formData.type === 1) {
model1.formData.typeName = '出库卡'
}else if (model1.formData.type === 2) {
model1.formData.typeName = '入库卡'
}
//
uni.setNavigationBarTitle({
title: title,
});
});
</script>
<style lang="scss" scoped>
.c-card {
background: #ffffff;
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 30rpx 25rpx;
padding: 10rpx 20rpx;
::v-deep .u-form-item {
height: auto;
}
::v-deep .u-form-item + .u-form-item {
border-top: 1rpx solid rgba(233, 233, 233, 0.76);
}
}
.btn-box {
margin-top: 60rpx;
display: flex;
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
bottom: 0rpx;
z-index: 999;
::v-deep button {
border-radius: 43rpx;
}
}
</style>

View File

@ -0,0 +1,248 @@
<template>
<view class="c-card">
<u-form
labelPosition="left"
:model="model1"
:rules="rules"
ref="form"
:labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }"
>
<u-form-item
:prop="`formData[${item.key}]`"
:label="item.name"
:required="item.required"
v-for="(item, index) in formAttrList"
:key="index"
@click="item.fn"
>
<u-textarea
v-if="item.type === 'textarea'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`请输入${item.name}`"
></u-textarea>
<u-input
v-if="
item.type === 'select' ||
item.type === 'input' ||
item.type === 'cascader'
"
v-model="(model1.formData as any)[item.key]"
:placeholder="`${item.type === 'select' ? '选择' : '输入'}${
item.name
}`"
:clearable="true"
:customStyle="{}"
border="none"
>
<template #suffix>
<text>
{{ item.unit }}
</text>
</template>
</u-input>
<template
#right
v-if="item.type === 'select' || item.type === 'cascader'"
>
<u-icon name="arrow-right"></u-icon>
</template>
</u-form-item>
</u-form>
<!-- <block v-for="(item, index) in formAttrList" :key="index">
<u-action-sheet
v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list"
:title="contrlModalParams[item.childKey].title"
:show="contrlModalParams[item.childKey].isShow"
@select="(v: any) => handleSelect(item.childKey, v)"
@close="contrlModalParams[item.childKey].isShow = false"
:closeOnClickAction="true"
></u-action-sheet>
</block> -->
<u-picker
:show="contrlModalParams['reCategory'].isShow"
:title="contrlModalParams['reCategory'].title"
ref="uPicker"
:columns="contrlModalParams['reCategory'].list"
@cancel="contrlModalParams['reCategory'].isShow = false"
@change="handleChange"
keyName="shmCategoryName"
@confirm="confirm"
></u-picker>
</view>
<view class="btn-box">
<u-button type="primary" text="保存" @click="save()"></u-button>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
const { proxy } = getCurrentInstance();
const model1 = reactive<any>({
formData: {},
});
const rules = ref({
"userInfo.userName": {
type: "string",
required: true,
message: "请输入手机号",
trigger: ["blur", "change"],
},
"userInfo.password": {
type: "string",
required: true,
message: "请输入密码",
trigger: ["blur", "change"],
},
});
const contrlModalParams = reactive<any>({
reCategory: {
isShow: false,
title: "标题",
list: [],
},
});
const formAttrList = reactive<any>([
{
name: "出货产品",
key: "shmProductsName",
type: "input",
required: true,
unit: "",
},
{
name: "出货分类",
key: "reCategoryName",
type: "cascader",
childKey: "reCategory",
required: true,
unit: "",
fn: () => {
contrlModalParams.reCategory.isShow = true;
contrlModalParams.reCategory.title = "出货分类";
},
},
]);
// const handleSelect = (key: string, v: any) => {
// contrlModalParams[key].isShow = false;
// if (key === "reCategory") {
// model1.formData.reCategoryName = v.name;
// model1.formData.reCategoryId = v.id;
// }
// };
const handleChange = (e: any) => {
const {
columnIndex,
value,
values, // values
index,
picker = proxy.$refs.uPicker,
} = e;
console.log(columnIndex, value, values, index, picker);
if (columnIndex === 0) {
// pickerthis
picker.setColumnValues(1, value[0].childrenList || []);
}
};
const confirm = (e: any) => {
if (e.value[1]) {
model1.formData.shmCategoryId = e.value[1].id
model1.formData.reCategoryName = e.value[1].shmCategoryName
contrlModalParams['reCategory'].isShow = false
}
};
const save = () => {
if (model1.formData.id) {
// GoodsApi.EditReceiveProduct(model1.formData).then((res) => {
// if (res.code === 200) {
// uni.redirectTo({
// url: "/pagesApp/shipmentProduct", //
// });
// }
// });
} else {
GoodsApi.addShipmentProduct(model1.formData).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/shipmentProduct", //
});
}
});
}
};
const getTypeList = () => {
GoodsApi.getShipmentCategory().then((res) => {
if (res.code === 200) {
contrlModalParams.reCategory.list = [
(res.data as any).map((item: any) => {
return { ...item, name: item.reCategoryName };
}),
];
contrlModalParams.reCategory.list.push(
contrlModalParams.reCategory.list[0][0].childrenList
);
}
});
};
onMounted(() => {
getTypeList();
});
onLoad((option) => {
//
const title = (option as any).title;
model1.formData = JSON.parse((option as any).item) || {};
if (option) {
if (model1.formData.shmCategoryName) {
model1.formData.reCategoryName = model1.formData.shmCategoryName;
}
}
//
if (title) {
uni.setNavigationBarTitle({
title: title,
});
}
});
</script>
<style lang="scss" scoped>
.c-card {
background: #ffffff;
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 30rpx 25rpx;
padding: 10rpx 20rpx;
::v-deep .u-form-item {
height: auto;
}
::v-deep .u-form-item + .u-form-item {
border-top: 1rpx solid rgba(233, 233, 233, 0.76);
}
}
.btn-box {
margin-top: 60rpx;
display: flex;
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
bottom: 0rpx;
z-index: 999;
::v-deep button {
border-radius: 43rpx;
}
}
</style>

View File

@ -0,0 +1,174 @@
<template>
<view class="c-card">
<u-form
labelPosition="left"
:model="model1"
:rules="rules"
ref="form"
:labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }"
>
<u-form-item
:prop="`formData[${item.key}]`"
:label="item.name"
:required="item.required"
v-for="(item, index) in formAttrList"
:key="index"
@click="item.fn"
>
<u-textarea
v-if="item.type === 'textarea'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`请输入${item.name}`"
></u-textarea>
<u-input
v-if="item.type === 'select' || item.type === 'input'"
v-model="(model1.formData as any)[item.key]"
:placeholder="`${item.type === 'select' ? '选择' : '输入'}${
item.name
}`"
:clearable="true"
:customStyle="{}"
border="none"
>
<template #suffix>
<text>
{{ item.unit }}
</text>
</template>
</u-input>
<template #right v-if="item.type === 'select'">
<u-icon name="arrow-right"></u-icon>
</template>
</u-form-item>
</u-form>
<block v-for="(item, index) in formAttrList" :key="index">
<u-action-sheet
v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list"
:title="contrlModalParams[item.childKey].title"
:show="contrlModalParams[item.childKey].isShow"
@select="(v: any) => handleSelect(item.childKey, v)"
@close="contrlModalParams[item.childKey].isShow = false"
:closeOnClickAction="true"
></u-action-sheet>
</block>
</view>
<view class="btn-box">
<u-button type="primary" text="保存" @click="save()"></u-button>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
const model1 = reactive<any>({
formData: {},
});
const rules = ref({
"userInfo.userName": {
type: "string",
required: true,
message: "请输入手机号",
trigger: ["blur", "change"],
},
"userInfo.password": {
type: "string",
required: true,
message: "请输入密码",
trigger: ["blur", "change"],
},
});
const contrlModalParams = reactive<any>({
cardType: {
isShow: false,
title: "标题",
list: [{
id: 1,
name: '出库卡'
},{
id: 2,
name: '入库卡'
}],
}
});
const formAttrList = reactive<any>([
{
name: "出货分类",
key: "shmCategoryName",
type: "input",
required: true,
},
]);
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "cardType") {
model1.formData.typeName = v.name;
model1.formData.type = v.id;
}
};
const save = () => {
if (model1.formData.id) {
GoodsApi.editReceiveCategory(model1.formData).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/shipmentType", //
});
}
});
} else {
GoodsApi.addShmCategory({...model1.formData, parentId: 0}).then((res) => {
if (res.code === 200) {
uni.redirectTo({
url: "/pagesApp/shipmentType", //
});
}
});
}
};
onLoad((option) => {
//
const title = (option as any).title;
//
uni.setNavigationBarTitle({
title: title,
});
});
</script>
<style lang="scss" scoped>
.c-card {
background: #ffffff;
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 30rpx 25rpx;
padding: 10rpx 20rpx;
::v-deep .u-form-item {
height: auto;
}
::v-deep .u-form-item + .u-form-item {
border-top: 1rpx solid rgba(233, 233, 233, 0.76);
}
}
.btn-box {
margin-top: 60rpx;
display: flex;
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
bottom: 0rpx;
z-index: 999;
::v-deep button {
border-radius: 43rpx;
}
}
</style>

View File

@ -0,0 +1,159 @@
<template>
<view class="c-card">
<view class="search">
<u-search
placeholder="请输入收货产品名称"
v-model="state.name"
:showAction="false"
:bgColor="'#fff'"
:borderColor="'rgba(0, 0, 0, 0.1)'"
:placeholderColor="'#C1C1C1'"
@search="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<view class="box" v-for="(item, index) in pageList.list" :key="index">
<view>
<view>
<view>{{ item.reProductsName }}</view>
<view>{{ item.minPrice }} ~ {{ item.maxPrice }} </view>
</view>
<view class="op-box">
<view class="btn" @click="edit(item)"> 编辑 </view>
<view class="btn" @click="update(item)"> 删除 </view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { UsersType } from "@/utils/enum";
const state = reactive<any>({
name: "",
supplierTypeId: -1,
isShowType: false,
typeList: [],
});
const pageList: PageResult<{
reProductsName: string;
minPrice: number;
maxPrice: number;
}> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
const handleSearch = () => {
getList();
};
const update = (item: any) => {
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then(
(res) => {
if (res.code === 200) {
getList();
}
}
);
};
const edit = (item: any) => {
uni.navigateTo({
url:
"/pagesApp/components/addReceiveProduct?title=编辑收货产品&item=" +
JSON.stringify(item), //
});
};
const getList = () => {
let params: any = {
pageSize: 10,
pageNum: 1,
name: state.name,
};
GoodsApi.getReceiveProductListByPage(params).then((res) => {
if (res.code === 200) {
if (res.code === 200) {
(pageList as any).list = (res.data as any).list;
}
}
});
};
const add = () => {
uni.navigateTo({
url: "/pagesApp/components/addReceiveProduct", //
});
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
.search {
display: flex;
align-items: center;
justify-content: space-between;
.type {
display: flex;
margin-right: 20rpx;
font-size: 28rpx;
color: #000000;
}
.btn {
background: #00dcee;
border-radius: 24rpx;
border: 1px solid #00dcee;
font-weight: 500;
font-size: 28rpx;
color: #ffffff;
margin-left: 50rpx;
padding: 6rpx 30rpx;
}
}
.box {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
padding: 10rpx 25rpx;
font-weight: 400;
font-size: 28rpx;
color: #000000;
line-height: 41rpx;
margin-top: 30rpx;
> view {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0rpx;
.op-box {
display: flex;
.btn + .btn {
margin-left: 20rpx;
}
.btn {
background: #ff9d55;
border-radius: 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #ffffff;
padding: 6rpx 30rpx;
}
.btn_text {
font-weight: 500;
font-size: 24rpx;
color: #00dcee;
}
}
}
> view + view {
border-top: 1px solid rgba(233, 233, 233, 0.76);
}
}
}
</style>

View File

@ -0,0 +1,140 @@
<template>
<view class="c-card">
<view class="search">
<u-search
placeholder="请输入收货分类"
v-model="state.name"
:showAction="false"
:bgColor="'#fff'"
:borderColor="'rgba(0, 0, 0, 0.1)'"
:placeholderColor="'#C1C1C1'"
@search="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<view class="box">
<view v-for="(item, index) in pageList.list" :key="index">
<view>
<view>{{ item.reCategoryName }}</view>
</view>
<view class="op-box">
<view class="btn" @click="edit(item)"> 编辑 </view>
<view class="btn" @click="deleteType(item)"> 删除 </view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { StockCardType } from "@/utils/enum";
const keyword = ref("");
const state = reactive<any>({
name: "",
});
const pageList: PageResult<{reCategoryName: string}> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
const add = () => {
uni.navigateTo({
url: "/pagesApp/components/addReceiveType", //
});
};
const edit = (item: any) => {
uni.navigateTo({
url:
"/pagesApp/components/addReceiveType?title=编辑收货分类&item=" +
JSON.stringify(item), //
});
};
const deleteType = (item: any) => {
GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
if (res.code === 200) {
getList();
}
});
};
const handleSearch = () => {
getList();
};
const getList = () => {
let params: any = {
pageSize: 10,
pageNum: 1,
reCategoryName: state.name,
};
if (state.supplierTypeId > -1) {
params.supplierTypeId = state.supplierTypeId;
}
GoodsApi.getPage(params).then((res) => {
if (res.code === 200) {
if (res.code === 200) {
(pageList as any).list = (res.data as any).list;
}
}
});
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
.search {
display: flex;
align-items: center;
justify-content: space-between;
.btn {
background: #00dcee;
border-radius: 24rpx;
border: 1px solid #00dcee;
font-weight: 500;
font-size: 26rpx;
color: #ffffff;
margin-left: 50rpx;
padding: 6rpx 30rpx;
}
}
.box {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
padding: 10rpx 25rpx;
font-weight: 400;
font-size: 26rpx;
color: #000000;
line-height: 41rpx;
margin-top: 30rpx;
> view {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0rpx;
.op-box {
display: flex;
.btn + .btn {
margin-left: 20rpx;
}
.btn {
background: #ff9d55;
border-radius: 24rpx;
font-weight: 500;
font-size: 26rpx;
color: #ffffff;
padding: 6rpx 30rpx;
}
}
}
> view + view {
border-top: 1px solid rgba(233, 233, 233, 0.76);
}
}
}
</style>

View File

@ -0,0 +1,159 @@
<template>
<view class="c-card">
<view class="search">
<u-search
placeholder="请输入出货产品名称"
v-model="state.name"
:showAction="false"
:bgColor="'#fff'"
:borderColor="'rgba(0, 0, 0, 0.1)'"
:placeholderColor="'#C1C1C1'"
@search="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<view class="box" v-for="(item, index) in pageList.list" :key="index">
<view>
<view>
<view>{{ item.shmProductsName }}</view>
<view>分类{{ item.parentName }} / {{ item.shmCategoryName }} </view>
</view>
<view class="op-box">
<view class="btn" @click="edit(item)"> 编辑 </view>
<view class="btn" @click="update(item)"> 删除 </view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { UsersType } from "@/utils/enum";
const state = reactive<any>({
name: "",
supplierTypeId: -1,
isShowType: false,
typeList: [],
});
const pageList: PageResult<{
shmProductsName: string;
parentName: string;
shmCategoryName: string;
}> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
const handleSearch = () => {
getList();
};
const update = (item: any) => {
GoodsApi.EditReceiveProduct({ isDeleted: true, id: item.id }).then(
(res) => {
if (res.code === 200) {
getList();
}
}
);
};
const edit = (item: any) => {
uni.navigateTo({
url:
"/pagesApp/components/addShipmentProduct?title=编辑收货产品&item=" +
JSON.stringify(item), //
});
};
const getList = () => {
let params: any = {
pageSize: 10,
pageNum: 1,
name: state.name,
};
GoodsApi.getShipmentProductByPage(params).then((res) => {
if (res.code === 200) {
if (res.code === 200) {
(pageList as any).list = (res.data as any).list;
}
}
});
};
const add = () => {
uni.navigateTo({
url: "/pagesApp/components/addShipmentProduct", //
});
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
.search {
display: flex;
align-items: center;
justify-content: space-between;
.type {
display: flex;
margin-right: 20rpx;
font-size: 28rpx;
color: #000000;
}
.btn {
background: #00dcee;
border-radius: 24rpx;
border: 1px solid #00dcee;
font-weight: 500;
font-size: 28rpx;
color: #ffffff;
margin-left: 50rpx;
padding: 6rpx 30rpx;
}
}
.box {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
padding: 10rpx 25rpx;
font-weight: 400;
font-size: 28rpx;
color: #000000;
line-height: 41rpx;
margin-top: 30rpx;
> view {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0rpx;
.op-box {
display: flex;
.btn + .btn {
margin-left: 20rpx;
}
.btn {
background: #ff9d55;
border-radius: 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #ffffff;
padding: 6rpx 30rpx;
}
.btn_text {
font-weight: 500;
font-size: 24rpx;
color: #00dcee;
}
}
}
> view + view {
border-top: 1px solid rgba(233, 233, 233, 0.76);
}
}
}
</style>

View File

@ -0,0 +1,140 @@
<template>
<view class="c-card">
<view class="search">
<u-search
placeholder="请输入出货分类"
v-model="state.name"
:showAction="false"
:bgColor="'#fff'"
:borderColor="'rgba(0, 0, 0, 0.1)'"
:placeholderColor="'#C1C1C1'"
@search="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<view class="box">
<view v-for="(item, index) in pageList.list" :key="index">
<view>
<view>{{ item.reCategoryName }}</view>
</view>
<view class="op-box">
<view class="btn" @click="edit(item)"> 编辑 </view>
<view class="btn" @click="deleteType(item)"> 删除 </view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { GoodsApi } from "@/services";
import { StockCardType } from "@/utils/enum";
const keyword = ref("");
const state = reactive<any>({
name: "",
});
const pageList: PageResult<{reCategoryName: string}> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
const add = () => {
uni.navigateTo({
url: "/pagesApp/components/addShipmentType", //
});
};
const edit = (item: any) => {
uni.navigateTo({
url:
"/pagesApp/components/addShipmentType?title=编辑出货分类&item=" +
JSON.stringify(item), //
});
};
const deleteType = (item: any) => {
GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
if (res.code === 200) {
getList();
}
});
};
const handleSearch = () => {
getList();
};
const getList = () => {
let params: any = {
pageSize: 10,
pageNum: 1,
reCategoryName: state.name,
};
if (state.supplierTypeId > -1) {
params.supplierTypeId = state.supplierTypeId;
}
GoodsApi.getPage(params).then((res) => {
if (res.code === 200) {
if (res.code === 200) {
(pageList as any).list = (res.data as any).list;
}
}
});
};
onMounted(() => {
getList();
});
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
.search {
display: flex;
align-items: center;
justify-content: space-between;
.btn {
background: #00dcee;
border-radius: 24rpx;
border: 1px solid #00dcee;
font-weight: 500;
font-size: 26rpx;
color: #ffffff;
margin-left: 50rpx;
padding: 6rpx 30rpx;
}
}
.box {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
padding: 10rpx 25rpx;
font-weight: 400;
font-size: 26rpx;
color: #000000;
line-height: 41rpx;
margin-top: 30rpx;
> view {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0rpx;
.op-box {
display: flex;
.btn + .btn {
margin-left: 20rpx;
}
.btn {
background: #ff9d55;
border-radius: 24rpx;
font-weight: 500;
font-size: 26rpx;
color: #ffffff;
padding: 6rpx 30rpx;
}
}
}
> view + view {
border-top: 1px solid rgba(233, 233, 233, 0.76);
}
}
}
</style>

View File

@ -360,27 +360,27 @@ const appList = reactive([
icon: "09.png", icon: "09.png",
title: "收货产品", title: "收货产品",
fn: () => { fn: () => {
// uni.navigateTo({ uni.navigateTo({
// url: "/pagesApp/receiveSpl", // url: "/pagesApp/receiveProduct", //
// }); });
}, },
}, },
{ {
icon: "10.png", icon: "10.png",
title: "收货分类", title: "收货分类",
fn: () => { fn: () => {
// uni.navigateTo({ uni.navigateTo({
// url: "/pagesApp/shipmentSpl", // url: "/pagesApp/receiveType", //
// }); });
}, },
}, },
{ {
icon: "11.png", icon: "11.png",
title: "出货产品", title: "出货产品",
fn: () => { fn: () => {
// uni.navigateTo({ uni.navigateTo({
// url: "/pagesApp/receiveDetail", // url: "/pagesApp/shipmentProduct", //
// }); });
}, },
}, },
{ {
@ -437,6 +437,15 @@ const appList = reactive([
}); });
}, },
}, },
{
icon: "16.png",
title: "出货分类",
fn: () => {
uni.navigateTo({
url: "/pagesApp/shipmentType", //
});
},
},
]); ]);
const tabMenuList = reactive([ const tabMenuList = reactive([