优化company/profile

This commit is contained in:
2024-09-20 16:11:55 +08:00
parent e298d960e7
commit ed4b4afda0
74 changed files with 2392 additions and 8130 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -100,21 +100,49 @@
v-model:value="form.unitName"
/>
</a-form-item>
<a-form-item label="商品价格" name="price">
<a-input-number
:placeholder="`商品价格`"
style="width: 240px"
v-model:value="form.price"
/>
<div class="ele-text-placeholder">商品的实际购买金额最低0.01</div>
</a-form-item>
<a-form-item label="市场价" name="salePrice">
<a-input-number
:placeholder="`市场价`"
style="width: 240px"
:min="0.01"
v-model:value="form.salePrice"
/>
<div class="ele-text-placeholder">划线价仅用于商品页展示</div>
<div class="ele-text-placeholder">市场价或划线价仅用于商品页展示</div>
</a-form-item>
<a-form-item label="会员价" name="price">
<a-space>
<a-input-number
:placeholder="`会员价`"
style="width: 240px"
:min="0.01"
v-model:value="form.price"
/>
<a-checkbox v-model:checked="form.priceGift">有赠品</a-checkbox>
</a-space>
<div class="ele-text-placeholder">商品的实际购买金额最低0.01</div>
</a-form-item>
<a-form-item label="经销商" name="buyingPrice">
<a-space>
<a-input-number
:placeholder="`经销商价格`"
style="width: 240px"
:min="0.01"
v-model:value="form.dealerPrice"
/>
<a-checkbox v-model:checked="form.dealerGift">有赠品</a-checkbox>
</a-space>
<div class="ele-text-placeholder">经销商价格</div>
</a-form-item>
<a-form-item label="进货价" name="buyingPrice">
<a-space>
<a-input-number
:placeholder="`进货价`"
:min="0.01"
style="width: 240px"
v-model:value="form.buyingPrice"
/>
</a-space>
<div class="ele-text-placeholder">进货价</div>
</a-form-item>
<a-form-item label="当前库存" name="stock">
<a-input-number
@@ -272,14 +300,6 @@
</a-form-item>
</a-tab-pane>
<a-tab-pane tab="营销设置" key="coupon">
<a-form-item label="货架" name="position">
<a-input
allow-clear
style="width: 250px"
placeholder="请输入货架"
v-model:value="form.position"
/>
</a-form-item>
<a-form-item label="商品重量" name="goodsWeight">
<a-input
allow-clear
@@ -309,6 +329,14 @@
<a-radio :value="10">下单减库存</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="货架" name="position">
<a-input
allow-clear
style="width: 250px"
placeholder="请输入货架"
v-model:value="form.position"
/>
</a-form-item>
<a-form-item label="排序号" name="sortNumber">
<a-input-number
:min="0"
@@ -345,7 +373,6 @@
import { GoodsSpec } from "@/api/shop/goodsSpec/model";
import { generateGoodsSku, listGoodsSku } from "@/api/shop/goodsSku";
import { listGoodsSpec } from "@/api/shop/goodsSpec";
import CategorySelect from "@/views/cms/article/components/category-select.vue";
import { GoodsCategory } from "@/api/shop/goodsCategory/model";
import { listGoodsCategory } from "@/api/shop/goodsCategory";
@@ -435,12 +462,16 @@
content: undefined,
unitName: '',
categoryId: undefined,
categoryParent: undefined,
categoryChildren: undefined,
parentName: undefined,
categoryName: undefined,
specs: 0,
position: undefined,
price: undefined,
salePrice: undefined,
buyingPrice: undefined,
dealerPrice: undefined,
priceGift: undefined,
dealerGift: undefined,
files: undefined,
sales: 0,
gainIntegral: 0,
@@ -505,7 +536,23 @@
price: [
{
required: true,
message: '请填写商品价格',
message: '请填写会员价',
type: 'number',
trigger: 'blur'
}
],
salePrice: [
{
required: true,
message: '请填写市场价',
type: 'number',
trigger: 'blur'
}
],
buyingPrice: [
{
required: true,
message: '请填写进货价',
type: 'number',
trigger: 'blur'
}
@@ -570,8 +617,8 @@
const chooseGoodsCategory = (item: GoodsCategory,value: any) => {
form.categoryId = value[1].value;
form.categoryParent = value[0].label;
form.categoryChildren = value[1].label;
form.parentName = value[0].label;
form.categoryName = value[1].label;
}
const chooseTakeawayCategory = (item: GoodsCategory, value: any) => {
form.categoryParent = '店铺分类';
@@ -787,6 +834,7 @@
const formData = {
...form,
content: content.value,
category: JSON.stringify(category.value),
files: JSON.stringify(files.value),
goodsSpec: goodsSpec.value,
goodsSkus: skuList.value,
@@ -845,11 +893,11 @@
});
}
// 商品分类
if(props.data.categoryParent){
category.value.push(props.data.categoryParent);
if(props.data.parentName){
category.value.push(props.data.parentName);
}
if(props.data.categoryChildren){
category.value.push(props.data.categoryChildren);
if(props.data.category){
category.value = JSON.parse(props.data.category);
}
if (props.data.content){
content.value = props.data.content;

View File

@@ -27,7 +27,7 @@
<a
@click="
openSpmUrl(
`/product/detail/${record.goodsId}`,
`https://${record.tenantId}.wsdns.cn/product/detail/${record.goodsId}`,
record,
record.goodsId
)