From 2800569b47af74989e2713a0b1d13d520e1e71cd Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 18:10:29 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A2=E5=8D=95=EF=BC=8C=E5=95=86?=
=?UTF-8?q?=E5=93=81=EF=BC=8C=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=EF=BC=8C?=
=?UTF-8?q?=E5=88=86=E7=BB=84=EF=BC=8C=E5=88=86=E7=B1=BB=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=20=E5=88=A0=E9=99=A4=E6=89=B9=E9=87=8F?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
commons/style/common.scss | 7 ++
components/my-components/my-upload-file.vue | 12 +++
pageCategory/edit-category/edit-category.vue | 22 +++--
pageCategory/index/components/category.vue | 48 ++++++----
.../edit-group-goods/edit-group-goods.vue | 6 +-
pageGoodsGroup/edit-group/edit-group.vue | 33 +++++--
pageGoodsGroup/index/index.vue | 2 +-
.../add-printer/components/picker-item.vue | 3 +
pageProduct/add-Product/add-Product.vue | 79 +++++++++-------
.../add-Product/components/edit-haocai.vue | 22 ++---
.../choose-specifications.vue | 10 +-
.../components/fast-edit.vue | 12 +--
pageProduct/index/components/baosun.vue | 5 +-
pageProduct/index/components/control.vue | 9 +-
pageProduct/index/components/edit-guige.vue | 4 +-
pageProduct/index/components/edit-stock.vue | 2 +-
pageProduct/index/index.vue | 8 +-
.../components/specifications-item.vue | 15 +--
.../choose-table/choose-table.vue | 12 +--
.../confirm-order/components/remark.vue | 8 +-
.../confirm-order/confirm-order.vue | 16 ++--
pagesOrder/index/compoents/filter.vue | 8 +-
pagesOrder/index/compoents/order-item.vue | 94 +++++++++++++++----
.../uni-forms-item/uni-forms-item.vue | 2 +-
24 files changed, 283 insertions(+), 156 deletions(-)
diff --git a/commons/style/common.scss b/commons/style/common.scss
index 5afbff7..b6b3ec8 100644
--- a/commons/style/common.scss
+++ b/commons/style/common.scss
@@ -396,4 +396,11 @@ text {
//覆盖u-view-plus 颜色
.u-primary-light {
color: $my-main-color;
+}
+::v-deep .u-border{
+ border-width: 1px!important;
+}
+
+::v-deep .u-m-t-16 .u-textarea{
+ border-width: 1px!important;
}
\ No newline at end of file
diff --git a/components/my-components/my-upload-file.vue b/components/my-components/my-upload-file.vue
index 0066456..5d187ca 100644
--- a/components/my-components/my-upload-file.vue
+++ b/components/my-components/my-upload-file.vue
@@ -1,5 +1,6 @@
@@ -8,6 +9,7 @@
$uploadFile
} from '@/http/yskApi/file.js'
import {
+ reactive,
ref,
watch
} from 'vue';
@@ -21,6 +23,16 @@
limit: {
type: Number,
default: 10
+ },
+ imageStyles:{
+ type:Object,
+ default:()=>{
+ return {
+ border:{
+ radius:'12rpx'
+ }
+ }
+ }
}
})
const emits = defineEmits(['change'])
diff --git a/pageCategory/edit-category/edit-category.vue b/pageCategory/edit-category/edit-category.vue
index c841e09..e829191 100644
--- a/pageCategory/edit-category/edit-category.vue
+++ b/pageCategory/edit-category/edit-category.vue
@@ -13,13 +13,13 @@
-
-
@@ -72,18 +72,18 @@
子分类
-
-
- 名称
+
+
+ 名称
图片
状态
颜色
操作
-
+
-
+
{{item.name}}
@@ -96,7 +96,7 @@
{{item.style}}
-
+
更多
@@ -747,13 +747,15 @@
.lh40 {
line-height: 40rpx;
}
-
+ ::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label{
+ padding-bottom: 24rpx;
+ }
.box {
font-size: 28rpx;
.block {
background: #FFFFFF;
- border-radius: 18rpx 18rpx 18rpx 18rpx;
+ border-radius: 6px 18rpx 0 18rpx;
padding: 12rpx 24rpx;
margin-bottom: 32rpx;
}
diff --git a/pageCategory/index/components/category.vue b/pageCategory/index/components/category.vue
index 6c17731..002994b 100644
--- a/pageCategory/index/components/category.vue
+++ b/pageCategory/index/components/category.vue
@@ -8,7 +8,8 @@
:checked="data.checked" />
-
+
+
{{data.name}}
@@ -24,7 +25,7 @@
-
+
-
- 开关
-
-
+
+ 是否启用
+
+
-
-
+
删除
编辑
+
@@ -61,7 +65,7 @@
ColorMain
} from '@/commons/color.js'
- const emits = defineEmits(['radioClick', 'changeClick', 'useTypeClick', 'del','isShowChange'])
+ const emits = defineEmits(['radioClick', 'changeClick', 'useTypeClick', 'del', 'isShowChange'])
const props = defineProps({
index: {
@@ -71,7 +75,7 @@
type: Object,
default: () => {
return {
- isShow:true
+ isShow: true
}
}
},
@@ -80,13 +84,17 @@
default: false
}
})
- let isShow=ref(props.data.isShow)
- watch(()=>props.data.isShow,(newval)=>{
- isShow.value=newval
+ let isShow = ref(props.data.isShow)
+ watch(() => props.data.isShow, (newval) => {
+ isShow.value = newval
})
- function isShowChange(){
+
+ function isShowChange() {
console.log(isShow.value);
- emits('isShowChange',{...props.data,isShow:isShow.value})
+ emits('isShowChange', {
+ ...props.data,
+ isShow: isShow.value
+ })
}
const computedUserType = computed(() => {
const len = props.data.useTypes.length
@@ -132,7 +140,7 @@
//携带参数type edit跳转到商品添加页面,编辑与添加同一页面,根据type值来判断
function toEdit() {
- uni.setStorageSync('cateItem',props.data)
+ uni.setStorageSync('cateItem', props.data)
go.to('PAGES_CATEGORY_EDIT', {
type: 'edit',
})
@@ -144,19 +152,19 @@
$price-color: #F02C45;
.btn {
- padding: 10rpx 40rpx;
+ padding: 6rpx 28rpx;
border-radius: 100rpx;
- border: 2rpx solid transparent;
+ font-size: 24rpx;
+ border: 1px solid transparent;
}
.btn-primary {
border-color: $my-main-color;
- ;
color: $my-main-color;
}
.btn-default {
- border-color: #F4F4F4;
+ border-color: #999;
color: #999;
}
diff --git a/pageGoodsGroup/edit-group-goods/edit-group-goods.vue b/pageGoodsGroup/edit-group-goods/edit-group-goods.vue
index e3eefd8..8cac28d 100644
--- a/pageGoodsGroup/edit-group-goods/edit-group-goods.vue
+++ b/pageGoodsGroup/edit-group-goods/edit-group-goods.vue
@@ -1,7 +1,7 @@
-
+
@@ -20,7 +20,9 @@
-
+
+
+
diff --git a/pageGoodsGroup/edit-group/edit-group.vue b/pageGoodsGroup/edit-group/edit-group.vue
index fe861f7..4ec690d 100644
--- a/pageGoodsGroup/edit-group/edit-group.vue
+++ b/pageGoodsGroup/edit-group/edit-group.vue
@@ -5,10 +5,12 @@
-
+
-
+
+
+
@@ -53,7 +55,9 @@
-
+
+
+
@@ -486,7 +490,7 @@
::v-deep .uni-forms-item__error {
display: none !important;
}
-
+
::v-deep .option .uni-forms-item {
padding: 0;
min-height: inherit;
@@ -547,13 +551,26 @@
.lh40 {
line-height: 40rpx;
}
-
+ ::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label{
+ padding: 0;
+ }
+ ::v-deep .uni-forms-item{
+ min-height: inherit;
+ }
+ ::v-deep .input-padding-b-0 .uni-forms-item--border{
+ padding-bottom: 0;
+ padding-top: 0;
+ }
+ ::v-deep .uni-forms-item--border{
+ padding-top: 12px;
+ padding-bottom: 16px;
+ }
.box {
font-size: 28rpx;
.block {
background: #FFFFFF;
- border-radius: 18rpx 18rpx 18rpx 18rpx;
+ border-radius: 12rpx 18rpx 0 18rpx;
padding: 12rpx 24rpx;
margin-bottom: 32rpx;
}
@@ -561,6 +578,8 @@
.save-btn-box {
position: fixed;
+ font-size: 16px;
+ font-weight: 700;
left: 30rpx;
right: 30rpx;
bottom: 60rpx;
diff --git a/pageGoodsGroup/index/index.vue b/pageGoodsGroup/index/index.vue
index f153379..9a98058 100644
--- a/pageGoodsGroup/index/index.vue
+++ b/pageGoodsGroup/index/index.vue
@@ -19,7 +19,7 @@
- 新建分组
+ 新建分组
diff --git a/pagePrinter/add-printer/components/picker-item.vue b/pagePrinter/add-printer/components/picker-item.vue
index 016fb5e..4fce8e4 100644
--- a/pagePrinter/add-printer/components/picker-item.vue
+++ b/pagePrinter/add-printer/components/picker-item.vue
@@ -37,6 +37,9 @@
const emits = defineEmits(['update:modelValue'], )
const selText = computed(() => {
const item = props.list.filter(ele => ele.value == props.modelValue)[0]
+ if(!item){
+ return ''
+ }
return item.name
})
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index 7237039..5a977eb 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -10,27 +10,30 @@
-
-
-
-
-
-
-
-
+ -->
+
+
+
+
-
+
注:第一张图为商品封面图,图片尺寸为750x750
@@ -39,7 +42,7 @@
-
+
@@ -109,7 +112,7 @@
-
+
@@ -120,17 +123,17 @@
-
+
- 组合名称
- 售价
- 库存数量
+ 组合名称
+ 售价
+
- {{item.specSnap}}
- ¥{{item.salePrice}}
- {{item.stockNumber||0}}
+ {{item.specSnap}}
+ ¥{{item.salePrice}}
+
@@ -390,7 +393,7 @@
-
+
+
+ 绑定至规格
+ 绑定至规格
+
+
{{goods.name}}
@@ -41,7 +41,7 @@
-
@@ -101,7 +101,7 @@
-
@@ -140,7 +140,7 @@
-->
- 保存
+ 保存
取消
@@ -302,9 +302,9 @@
watch(() => props.goods.typeEnum, (newval) => {
isBindGuige.value = isSku.value
})
-
-
+
+
async function save() {
const bol = await hasPermission('允许修改商品')
if (!bol) {
diff --git a/pageProduct/add-specifications/choose-specifications.vue b/pageProduct/add-specifications/choose-specifications.vue
index 5e50350..dd3f38d 100644
--- a/pageProduct/add-specifications/choose-specifications.vue
+++ b/pageProduct/add-specifications/choose-specifications.vue
@@ -398,31 +398,31 @@
salePrice: {
rules: [{
required: true,
- errorMessage: '必填'
+ errorMessage: '售价必填'
}]
},
memberPrice: {
rules: [{
required: true,
- errorMessage: '必填'
+ errorMessage: '会员价必填'
}]
},
costPrice: {
rules: [{
required: true,
- errorMessage: '必填'
+ errorMessage: '成本价必填'
}]
},
originPrice: {
rules: [{
required: true,
- errorMessage: '必填'
+ errorMessage: '原价必填'
}]
},
suit: {
rules: [{
required: true,
- errorMessage: '必填'
+ errorMessage: '起售数量必填'
},
{
validateFunction: function(rule, value, data, callback) {
diff --git a/pageProduct/add-specifications/components/fast-edit.vue b/pageProduct/add-specifications/components/fast-edit.vue
index a2a6a58..6879685 100644
--- a/pageProduct/add-specifications/components/fast-edit.vue
+++ b/pageProduct/add-specifications/components/fast-edit.vue
@@ -81,13 +81,13 @@
{
text: '起售数量',
key: 'suit',
- value: ''
- },
- {
- text: '库存数量',
- key: 'stockNumber',
- value: ''
+ value: 1
},
+ // {
+ // text: '库存数量',
+ // key: 'stockNumber',
+ // value: ''
+ // },
{
text: '分销金额',
key: 'firstShared',
diff --git a/pageProduct/index/components/baosun.vue b/pageProduct/index/components/baosun.vue
index 827ee9a..7680e7c 100644
--- a/pageProduct/index/components/baosun.vue
+++ b/pageProduct/index/components/baosun.vue
@@ -9,7 +9,7 @@
商品名称
- {{data.name}}
+ {{data.name}}
@@ -129,6 +129,9 @@
\ No newline at end of file
diff --git a/pageProduct/index/index.vue b/pageProduct/index/index.vue
index dca9a33..414dd84 100644
--- a/pageProduct/index/index.vue
+++ b/pageProduct/index/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -21,10 +21,12 @@
-
+
+
+
-
+
#{{index+1}} {{data.name}}
ID:{{data.id}}
-
+
添加时间:
-
+
- {{spec.name}}
-
+ {{spec.name}}
+
{{option}}
-
+
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index f54fab3..d290f2d 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -1,15 +1,21 @@
-
-
- {{data.tableName}}
- {{data.masterId}}
+
+
+
+
+ {{data.tableName}}
+
+
+
+ {{data.masterId}}
{{returnStatus(data.status)}}
-
+
+
{{sendTypeFilter(data.sendType)}}
@@ -24,7 +30,8 @@
{{goosZhonglei}}种商品,共{{goodsNumber}}件
-
+
{{item.productName}}
@@ -33,7 +40,7 @@
×{{item.num}}
- ¥{{item.price}}
+ ¥{{item.price}}
@@ -66,7 +73,7 @@
ref,
watch
} from 'vue';
- const emits=defineEmits(['printOrder'])
+ const emits = defineEmits(['printOrder'])
const props = defineProps({
data: {
type: Object,
@@ -80,27 +87,44 @@
}
})
let $goodsMap = {}
- let goosZhonglei =ref(0)
+ let goosZhonglei = ref(0)
let goodsNumber = ref(0)
- function goodsMapInit(){
+
+ const priceSize = 9
+
+ function computedPriceStyle() {
+ const item = props.data.detailList.reduce((prev, current) => (`${prev.price}`.length > `${current.price}`
+ .length) ? prev : current)
+ if (!item) {
+ return ''
+ }
+ return {
+ width: `${item.price}`.length * priceSize + 'px'
+ }
+ }
+ // const computedPriceStyle = computed(() => {
+
+ // })
+
+ function goodsMapInit() {
for (let i in props.data.detailList) {
const goods = props.data.detailList[i]
if ($goodsMap.hasOwnProperty(goods.productId)) {
- $goodsMap[goods.productId] += goods.num*1
- goodsNumber.value+=goods.num*1
+ $goodsMap[goods.productId] += goods.num * 1
+ goodsNumber.value += goods.num * 1
} else {
- $goodsMap[goods.productId] = goods.num*1
- goosZhonglei.value+=1
- goodsNumber.value+=goods.num*1
+ $goodsMap[goods.productId] = goods.num * 1
+ goosZhonglei.value += 1
+ goodsNumber.value += goods.num * 1
}
}
}
goodsMapInit()
watch(() => props.data.detailList.length, (newval) => {
- goodsNumber.value=0
+ goodsNumber.value = 0
goodsMapInit()
})
-
+
function formatTime(time) {
return dayjs(time).format('YYYY-MM-DD HH:mm:ss');
@@ -114,8 +138,8 @@
function sendTypeFilter(t) {
console.log(t);
if (t) {
- const item=orderEnum.sendType.find(item => item.key == t)
- return item?item.label:'';
+ const item = orderEnum.sendType.find(item => item.key == t)
+ return item ? item.label : '';
} else {
return t;
}
@@ -126,8 +150,9 @@
id: props.data.id
})
}
+
function print(item) {
- emits('printOrder',props.data)
+ emits('printOrder', props.data)
}
@@ -157,4 +182,33 @@
font-size: 24rpx;
border-radius: 100rpx;
}
+
+ .line {
+ height: 14px;
+ width: 1px;
+ background-color: #E5E5E5;
+ margin: 0 12rpx;
+ }
+
+ .row {
+ .top {
+ display: flex;
+
+ .name {
+ width: 50%;
+ }
+
+ .num {
+ width: 20%;
+ display: flex;
+ justify-content: flex-end;
+ }
+
+ .price {
+ width: 30%;
+ display: flex;
+ justify-content: flex-end;
+ }
+ }
+ }
\ No newline at end of file
diff --git a/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue b/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
index a497b85..aa8aa43 100644
--- a/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
+++ b/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
@@ -548,7 +548,7 @@ export default {
.is-required {
// color: $uni-color-error;
- color: #dd524d;
+ color: #EA4025;
font-weight: bold;
}
}
From d62939bb8958d36e845cdcb72970ff2db1ff3742 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 18:27:19 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=95=86=E5=93=81?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=8A?=
=?UTF-8?q?=E4=B8=8B=E6=9E=B6=E4=BF=9D=E5=AD=98=E5=9B=A0=E6=8F=90=E4=BA=A4?=
=?UTF-8?q?=E5=8F=82=E6=95=B0=E9=87=8Cskulist=E7=9A=84=E4=B8=8A=E4=B8=8B?=
=?UTF-8?q?=E6=9E=B6=E5=80=BC=E5=B9=B6=E6=9C=AA=E8=B7=9F=E6=80=BB=E4=BD=93?=
=?UTF-8?q?=E8=B5=B0=E5=AF=BC=E8=87=B4=E7=9A=84=E5=95=86=E5=93=81=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=90=8C=E6=AD=A5=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/add-Product/add-Product.vue | 56 ++++++++++++++++---------
1 file changed, 37 insertions(+), 19 deletions(-)
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index 5a977eb..8f06a11 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -28,12 +28,13 @@
-->
-
+
-
+
-
+
注:第一张图为商品封面图,图片尺寸为750x750
@@ -423,13 +424,13 @@
-
-
+
@@ -440,13 +441,13 @@
-
+
{
- infoBox.showSuccessToast('更新成功')
- settimeoutBack(1500)
+ $updateProductData([{
+ id: FormData.id,
+ isSku: 0,
+ shopId: uni.getStorageSync('shopId'),
+ key: 'grounding',
+ value: FormData.isGrounding
+ }]).then(() => {
+ infoBox.showSuccessToast('更新成功')
+ settimeoutBack(1500)
+ })
})
+
+
+
}
submitData.selectSpec =
$addProduct(submitData).then(res => {
@@ -1483,7 +1495,7 @@
uni.setStorageSync('guige', FormData.specificationsGroup)
go.to('PAGES_PRODUCT_GUIGE_CHOOSE', {
emitName: 'emitspecificationsSave',
- type:option.type,
+ type: option.type,
productId: option.productId
})
// go.to('PAGES_PRODUCT_GUIGE_ADD', {
@@ -1628,6 +1640,9 @@
onReady(() => {
Forms.value && Forms.value.setRules(rules)
})
+ onBeforeUnmount(() => {
+ clearTimeout(timer)
+ })