更新代码

This commit is contained in:
weipengfei 2023-11-01 20:01:52 +08:00
parent b63f6f4336
commit 40c8b5725e
16 changed files with 203 additions and 105 deletions

View File

@ -36,6 +36,9 @@ export function get_cloud_shop(street_code) {
export function post_product_import(id) { export function post_product_import(id) {
return request.post(`micro/product_import`, { id: id }, { noAuth: true }); return request.post(`micro/product_import`, { id: id }, { noAuth: true });
} }
export function micro_product_import(data) {
return request.post(`micro/product_import`, data, { noAuth: true });
}
/** /**
* 公共接口 优惠券接口 , 行业此讯 , 手机号码注册 * 公共接口 优惠券接口 , 行业此讯 , 手机号码注册
* *

View File

@ -46,7 +46,7 @@
<view class='btn-item err' v-if="item.is_refund >1">已退款 x <view class='btn-item err' v-if="item.is_refund >1">已退款 x
{{item.product_num - item.refund_num}}</view> {{item.product_num - item.refund_num}}</view>
<view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0' <view class='btn-item' v-if='item.is_reply==0 && evaluate==2 && item.is_refund==0 && order_status==4'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view> <view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>
@ -116,7 +116,7 @@
v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2" v-if="(item.is_refund ==0 && (evaluate != 10 && evaluate != 11) && orderData.refund_status || item.refund_num > 0)&& evaluate!=9 &&evaluate != 1&&evaluate !=4&& evaluate!=3 || evaluate==2"
@click.stop="refund(item)">申请退款</view> @click.stop="refund(item)">申请退款</view>
<view class='btn-item' <view class='btn-item'
v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3&& evaluate!=7&& evaluate!=8&& evaluate!=9&& item.refund_num > 0' v-if='item.is_reply==0 && evaluate!=2&& evaluate!=3&& evaluate!=7&& evaluate!=8&& evaluate!=9&& item.refund_num > 0&&order_status==4'
@click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view> @click.stop="evaluateTap(item.order_product_id,orderId)">去评价</view>
<view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view> <view class='btn-item on' v-else-if="item.is_reply==1 && evaluate==2">已评价</view>
</view> </view>
@ -177,7 +177,11 @@
default: function() { default: function() {
return {}; return {};
} }
} },
order_status:{
type: Number,
default: 0,
}
}, },
computed: mapGetters(['viewColor']), computed: mapGetters(['viewColor']),
data() { data() {

View File

@ -119,7 +119,7 @@
this.type = e.type this.type = e.type
if (this.type) { if (this.type) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '编辑打折' title: '编辑委托'
}) })
this.editlist(e.id) this.editlist(e.id)
} }
@ -192,13 +192,19 @@
}, },
// //
formSubmit(e) { formSubmit(e) {
console.log(e) // console.log(e)
let that = this, let that = this,
value = that.formData; value = that.formData;
if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({ if (value.entrust_day.length == 0 || value.entrust_day <= 0) return that.$util.Tips({
title: '请选择委托周期' title: '请选择委托周期'
}); });
if (value.entrust_day < 15) return that.$util.Tips({
title: '委托周期不得小于15天'
});
if (value.entrust_day > 90) return that.$util.Tips({
title: '委托周期不得大于90天'
});
if (value.product_info.length == 0) return that.$util.Tips({ if (value.product_info.length == 0) return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
}); });

View File

@ -64,7 +64,7 @@
{{objinfo.entrust_day}} {{objinfo.entrust_day}}
</view> </view>
</view> </view>
<view class="center-two"> <view v-if="credit_buy==1" class="center-two">
<view class="center-twoa"> <view class="center-twoa">
结算周期: 结算周期:
</view> </view>
@ -72,7 +72,7 @@
{{objinfo.mer_info.settle_cycle}} {{objinfo.mer_info.settle_cycle}}
</view> </view>
</view> </view>
<view class="center-two"> <view v-if="credit_buy==1" class="center-two">
<view class="center-twoa"> <view class="center-twoa">
结算利息: 结算利息:
</view> </view>
@ -154,11 +154,13 @@
} }
], ],
type: 0, type: 0,
credit_buy: 0,
} }
}, },
onLoad(e) { onLoad(e) {
this.list(e.id) this.list(e.id)
this.type = e.type this.type = e.type
this.credit_buy = e.credit_buy || 0;
}, },
onShow() { onShow() {

View File

@ -53,9 +53,9 @@
编辑 编辑
</view> </view>
<span></span> <span></span>
<!-- <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)"> <view class="contentgn_a" style="margin-left: 10rpx;" @click="deleteOrder(item)">
删除 删除
</view> --> </view>
<span></span> <span></span>
<view class="contentgn_b" @click="detail(item)"> <view class="contentgn_b" @click="detail(item)">
详情 详情
@ -386,7 +386,7 @@
detail(item) { detail(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id url: `/pages/commissionedSales/delegation_details/index?id=${item.community_id}&credit_buy=${item.mer_info.credit_buy}`
}) })
}, },
// //
@ -437,24 +437,31 @@
}, },
// //
deleteOrder(item) { deleteOrder(item) {
uni.showModal({
checkchain(item.community_id, { title:'警告',
status: 3 content:'删除后不可恢复, 是否继续删除?',
}).then(res => { complete: (e) => {
this.$util.Tips({ if(e.confirm){
title: res.message, checkchain(item.community_id, {
icon: 'success' status: 3
}) }).then(res => {
this.orderList = [] this.$util.Tips({
this.tabTitle = "tabOne" title: res.message,
this.commislist() icon: 'success'
}).catch((err) => { })
console.log(err) this.orderList = []
this.$util.Tips({ this.tabTitle = "tabOne"
title: err, this.commislist()
icon: 'error' }).catch((err) => {
}) console.log(err)
}) this.$util.Tips({
title: err,
icon: 'error'
})
})
}
}
})
}, },
// //
auditEdit() { auditEdit() {

View File

@ -367,7 +367,7 @@
// //
detail(item) { detail(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/commissionedSales/delegation_details/index?id=' + item.community_id url: `/pages/commissionedSales/delegation_details/index?id=${item.community_id}&credit_buy=${item.mer_info.credit_buy}`
}) })
}, },
// //

View File

@ -12,12 +12,13 @@
<view class="list-box listA" :class="goods.length > 0 ? 'fadeIn on' : ''"> <view class="list-box listA" :class="goods.length > 0 ? 'fadeIn on' : ''">
<view class="item" v-for="(item, index) in goods" :key="index"> <view class="item" v-for="(item, index) in goods" :key="index">
<view class="pictrue"> <view class="pictrue">
<easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> <!-- <easy-loadimage mode="widthFix" :image-src="item.image"></easy-loadimage> -->
<image :src="item.image" :lazy-load="true"></image>
</view> </view>
<view class="text-info"> <view class="text-info">
<view class="title">{{ item.store_name }}</view> <view class="title">{{ item.store_name }}</view>
<view class="price">¥<text>{{ item.price }}</text></view> <view class="price">¥<text>{{ item.price }}</text></view>
<view class="add-btn" @click="addGoods(item)">加入仓库</view> <view class="add-btn" @click="addGoods(item)">加入店铺</view>
</view> </view>
</view> </view>
</view> </view>
@ -43,8 +44,25 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-modal :show="addGoodsShow" content='是否添加到你的仓库中?' @cancel="addGoodsclose()" @close="addGoodsclose()" <!-- <u-modal :show="addGoodsShow" content='是否添加到你的仓库中?' @cancel="addGoodsclose()" @close="addGoodsclose()"
@confirm="addGoodsopen()" :closeOnClickOverlay="true" :showCancelButton="true"></u-modal> @confirm="addGoodsopen()" :closeOnClickOverlay="true" :showCancelButton="true"></u-modal> -->
<u-popup :show="addGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
<view class="search_goods_box">
<view style="text-align: center;font-weight: bold;">是否添加到你的仓库中?</view>
<view style="display: flex;align-items: center;margin-top: 16rpx;">
<view style="margin-right: 20rpx;">价格:</view>
<input style="flex: 1;" type="text" v-model="putGoods.price" class="putGoods" :placeholder="`请设置商品价格`">
</view>
<view style="display: flex;align-items: center;margin-top: 16rpx;">
<view style="margin-right: 20rpx;">库存:</view>
<input style="flex: 1;" type="text" v-model="putGoods.stock" class="putGoods" placeholder="请输入商品库存">
</view>
<view class="search_goods_btn">
<view class="cancel edit_btn" @click="addGoodsclose()">取消</view>
<view class="search edit_btn" @click="addGoodsopen()">确定</view>
</view>
</view>
</u-popup>
<u-popup :show="searchGoodsShow" @close="searchGoodsClose" :round="18" mode="center"> <u-popup :show="searchGoodsShow" @close="searchGoodsClose" :round="18" mode="center">
<view class="search_goods_box"> <view class="search_goods_box">
<input type="text" v-model="searchGoodsName" class="searchGoods" placeholder="请输入商品名称"> <input type="text" v-model="searchGoodsName" class="searchGoods" placeholder="请输入商品名称">
@ -68,7 +86,7 @@
} from '@/api/store.js' } from '@/api/store.js'
import { import {
seachBarCodeAPI, seachBarCodeAPI,
post_product_import micro_product_import
} from '@/api/api.js' } from '@/api/api.js'
import { import {
Toast Toast
@ -77,7 +95,7 @@
data() { data() {
return { return {
goodsData: [{ goodsData: [{
name: '', name: '商品名称添加',
type: 1, type: 1,
src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png' src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/mingcheng.png'
}, },
@ -96,7 +114,24 @@
mer_id: 0, mer_id: 0,
searchGoodsShow: false, searchGoodsShow: false,
searchGoodsName: '', searchGoodsName: '',
goods: [], goods: [
// {
// "id": 5,
// "store_name": "260 170X118X2605",
// "bar_code": "6940074914381",
// "unit_name": "",
// "price": "0.00",
// "cost": "0.00",
// "ot_price": "0.00",
// "stock": 9999999,
// "image": "127.0.0.1:8324/uploads/img/2023-11-01/1698809432.jpg"
// }
],
putGoods: {
id: '',
price: '',
stock: '',
},
item: [], item: [],
addGoodsShow: false, addGoodsShow: false,
stype: '', stype: '',
@ -104,28 +139,37 @@
}, },
onLoad(e) { onLoad(e) {
this.mer_id = e.mer_id this.mer_id = e.mer_id
this.stype = e.stype // this.stype = e.stype
if (this.stype == 1) { this.stype = 2
return this.goodsData[0].name = '商品添加' // if (this.stype == 1) {
} // return this.goodsData[0].name = ''
if (this.stype == 2) { // }
return this.goodsData[0].name = '商品名称添加' // if (this.stype == 2) {
} // return this.goodsData[0].name = ''
// }
}, },
onShow() { onShow() {
}, },
methods: { methods: {
addGoods(item) { addGoods(item) {
this.putGoods.id = item.id;
this.putGoods.price = '';
this.putGoods.stock = '';
this.addGoodsShow = true this.addGoodsShow = true
this.item = item this.item = item
}, },
addGoodsopen() { addGoodsopen() {
if (this.item) { if (this.putGoods.id) {
post_product_import(this.item.product_id).then(e => { console.log('开始');
micro_product_import(this.putGoods).then(e => {
if (e.status == 200) { if (e.status == 200) {
Toast(e.data.msg) Toast(e.data.msg)
this.addGoodsShow = false this.goods = this.goods.filter(item=>{
return item.id != this.putGoods.id
})
this.addGoodsShow = false;
} else { } else {
// console.log(e); // console.log(e);
Toast(e.message) Toast(e.message)
@ -149,6 +193,13 @@
}, },
openSearch() {}, openSearch() {},
async searchGoodsClose() { async searchGoodsClose() {
if(this.searchGoodsName=='') {
this.searchGoodsShow = false
this.$nextTick(()=>{
Toast('请输入商品名称')
})
return ;
}
const rq = { const rq = {
mer_id: this.mer_id, mer_id: this.mer_id,
name: this.searchGoodsName name: this.searchGoodsName
@ -192,6 +243,7 @@
}); });
return; return;
} }
this.searchGoodsName = '';
this.searchGoodsShow = true this.searchGoodsShow = true
} else { } else {
this.scanCode(); this.scanCode();
@ -217,10 +269,12 @@
}) })
}, },
async seachBarCode(code) { async seachBarCode(code) {
console.log('扫码的值', code);
await seachBarCodeAPI({ await seachBarCodeAPI({
code: code, code: code,
mer_id: this.mer_id mer_id: this.mer_id
}).then(res => { }).then(res => {
console.log(res);
if (!res.data) { if (!res.data) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
@ -236,7 +290,9 @@
} }
this.goods = res.data.list this.goods = res.data.list
} }
}) }).catch((err)=>{
console.log('错误',err);
})
}, },
@ -312,6 +368,13 @@
margin: 21.05rpx 0; margin: 21.05rpx 0;
} }
.putGoods {
height: 87.72rpx;
border: 1px solid #f5f5f5;
border-radius: 8px;
padding: 12px;
}
.search_goods_btn { .search_goods_btn {
margin-top: 28.07rpx; margin-top: 28.07rpx;
display: flex; display: flex;

View File

@ -26,7 +26,7 @@
<view class="name">{{ item.store_name }}</view> <view class="name">{{ item.store_name }}</view>
<view class="classify flex_a_c"> <view class="classify flex_a_c">
<text>分类{{ item.cate_name ? item.cate_name : '无' }}</text> <text>分类{{ item.cate_name ? item.cate_name : '无' }}</text>
<text style="margin-left: 17.54rpx;">单位{{ item.unit_name }}</text> <text style="margin-left: 17.54rpx;">单位{{ item.unit_name ? item.unit_name : '无' }}</text>
</view> </view>
<view class="bar_code">条形码{{item.bar_code?item.bar_code : '无'}}</view> <view class="bar_code">条形码{{item.bar_code?item.bar_code : '无'}}</view>
</view> </view>

View File

@ -30,6 +30,7 @@
</view> </view>
<view class='data' :class='isGoodsReturn ? "on":""'> <view class='data' :class='isGoodsReturn ? "on":""'>
<view class='state'> <view class='state'>
<block v-if="orderInfo.order_status == 1 && orderInfo.status == 0 ">待付款</block>
<block v-if="orderInfo.order_status == 2 ">待发货</block> <block v-if="orderInfo.order_status == 2 ">待发货</block>
<block v-if="orderInfo.status == 9">等待其他人参加拼团</block> <block v-if="orderInfo.status == 9">等待其他人参加拼团</block>
<block v-if="orderInfo.order_status == 7">待核销</block> <block v-if="orderInfo.order_status == 7">待核销</block>
@ -50,7 +51,7 @@
:class="orderInfo.order_status == 8||orderInfo.order_status == 1||orderInfo.order_status == 9 ? 'on':''"> :class="orderInfo.order_status == 8||orderInfo.order_status == 1||orderInfo.order_status == 9 ? 'on':''">
待付款</view> 待付款</view>
<view <view
:class="(orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2) ? 'on':''" :class="(orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 2)&&orderInfo.order_status != 1 ? 'on':''"
v-if="orderInfo.order_type != 1">待发货</view> v-if="orderInfo.order_type != 1">待发货</view>
<view <view
:class="(orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 7) ? 'on':''" :class="(orderInfo.status == 0 || orderInfo.status == 9||orderInfo.order_status == 7) ? 'on':''"
@ -161,8 +162,7 @@
<block v-if="cartInfo.length>0"> <block v-if="cartInfo.length>0">
<orderGoods :orderData='orderInfo' :evaluate='orderInfo.order_status' <orderGoods :orderData='orderInfo' :evaluate='orderInfo.order_status'
:activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true"> :activityType='orderInfo.activity_type' :orderId="order_id" :cartInfo="cartInfo" :jump="true" :order_status="orderInfo.order_status">
</orderGoods> </orderGoods>
<block <block
@ -170,7 +170,7 @@
v-for="(item,index) in orderInfo.takeOrderList" :key="index"> v-for="(item,index) in orderInfo.takeOrderList" :key="index">
<orderGoods :orderData='item' :evaluate='item.status' :activityType='item.activity_type' <orderGoods :orderData='item' :evaluate='item.status' :activityType='item.activity_type'
:orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true"></orderGoods> :orderId="item.order_id" :cartInfo="item.orderProduct" :jump="true" :order_status="orderInfo.order_status"></orderGoods>
</block> </block>
</block> </block>
@ -319,7 +319,7 @@
<view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单 <view v-if="orderInfo.presellOrder.activeStatus == 2" class='bnt cancel' @click="cancelOrder">取消订单
</view> </view>
</view> </view>
<block v-if="orderInfo.status == 0"> <block v-if="orderInfo.status == 0 && orderInfo.order_status!=1">
<view class="bnt cancel" @click="allRefund" <view class="bnt cancel" @click="allRefund"
v-if="refundNum.length != cartInfo.length && orderInfo.refund_status">批量退款</view> v-if="refundNum.length != cartInfo.length && orderInfo.refund_status">批量退款</view>
</block> </block>

View File

@ -4,11 +4,6 @@
<view class="content_list"> <view class="content_list">
<view class="content_list_item"> <view class="content_list_item">
<view>商品详情</view> <view>商品详情</view>
<!-- <view class="content_list_item_han">
<span v-if="disModel" style="color: #000000">去修改</span>
<span v-else>设置详情</span>
<span class="iconfont">&#xe6bd;</span>
</view> -->
</view> </view>
<input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils> <input-goods-detils class="input-goods-detils" @getProductContent="getProductContent" :title="store_name" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
<block v-if="!moreThanFlag"> <block v-if="!moreThanFlag">

View File

@ -3,7 +3,7 @@
<view class="step_one" v-if="step == 1"> <view class="step_one" v-if="step == 1">
<view class="input_content"> <view class="input_content">
<view class="bar-code" v-if="bar_code_dis"> <view class="bar-code" v-if="bar_code_dis">
<view>商品</view> <view>商品</view>
<!-- <view>{{ singleSpecification.bar_code }}</view> --> <!-- <view>{{ singleSpecification.bar_code }}</view> -->
<input type="number" placeholder="请手动添加条码" v-model="code" :disabled="bar_code_dis" <input type="number" placeholder="请手动添加条码" v-model="code" :disabled="bar_code_dis"
placeholder-class="inputPlaceHolder" /> placeholder-class="inputPlaceHolder" />
@ -11,14 +11,16 @@
<view class="input_content_textarea"> <view class="input_content_textarea">
<textarea v-model="setFormData.store_name" placeholder="请输入商品名称" placeholder-class="placeholderStyle" <textarea v-model="setFormData.store_name" placeholder="请输入商品名称" placeholder-class="placeholderStyle"
maxlength="60" /> maxlength="60" />
<view> <view class="flex" style="justify-content: space-between;color: #999999;">
<text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text> <view>(品牌,名称,规格,口味)</view>
<text v-else>0</text> <view>
/60 <text v-if="setFormData.store_name">{{ setFormData.store_name.length }}</text>
<text v-else>0</text>/60
</view>
</view> </view>
</view> </view>
<view class="photo_count"> <view class="photo_count">
<text class="photo_size">建议图片尺寸为750*750px, 上传2张以上</text> <text class="photo_size" style="color: #e93323;">建议图片尺寸为750*750px, 上传2张以上</text>
<view class="input_content_photo"> <view class="input_content_photo">
<view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList" :key="index"> <view class="input_content_photo_adPh" v-for="(item, index) in setFormData.imageList" :key="index">
<image :src="item" class="myimg2 photos" @click="pop(item)"></image> <image :src="item" class="myimg2 photos" @click="pop(item)"></image>
@ -84,7 +86,7 @@
</view> </view>
</view> </view>
<priceComponent :product_id="product_id" :bar_code="code" v-if="showCommodity"></priceComponent> <priceComponent :product_id="product_id" :bar_code="code" @updateCode = "updateCode" v-if="showCommodity"></priceComponent>
<!-- <view class="popup_group"> <!-- <view class="popup_group">
<view class="radio"> <view class="radio">
@ -168,15 +170,15 @@
</commodityComponent> </commodityComponent>
<view class="popup_group"> <view class="popup_group">
<view class="popup_group_item" @click="showMoreInfo=!showMoreInfo"> <!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view> <view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'"> <view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
<view><span class="iconfont">&#xe6bd;</span></view> <view><span class="iconfont">&#xe6bd;</span></view>
</view> </view>
</view> </view> -->
<block v-if="showMoreInfo"> <block >
<view class="input_content"> <view class="input_content">
<view class="input_content_describe" style="border-top: none"> <!-- <view class="input_content_describe" style="border-top: none">
<view class="input_content_describe_title"> <view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view> <view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num"> <view class="input_content_describe_title_num">
@ -189,7 +191,7 @@
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介" <textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
placeholderClass="placeholderClass" maxlength="200" /> placeholderClass="placeholderClass" maxlength="200" />
</view> </view>
</view> </view> -->
<view class="input_content_keyword"> <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view> <view class="input_content_keyword_label">关键字</view>
@ -799,6 +801,10 @@
return; return;
} }
}, },
//
updateCode(e){
this.code = e + '';
},
// //
// switch // switch
switchChange(value, item) { switchChange(value, item) {

View File

@ -29,7 +29,7 @@
price: '', // price: '', //
cost: '', // cost: '', //
stock: '', // stock: '', //
ot_price: '', // ot_price: '', //
bar_code: '', // bar_code: '', //
weight: '', // weight: '', //
volume: '', // volume: '', //
@ -39,53 +39,60 @@
}, },
moreThanFlag: true, moreThanFlag: true,
formList: [{ formList: [{
id: 1, id: 1,
label: '售价', label: '售价',
type: 'digit', type: 'digit',
model: 'price', model: 'price',
holder: '请填写售价' holder: '请填写售价',
}, { require: true,
id: 10, }, {
label: '库存', id: 10,
type: 'digit', label: '库存',
model: 'stock', type: 'digit',
holder: '请填写库存', model: 'stock',
disable: true holder: '请填写库存',
}], disable: true,
moreThanList: [{ require: true,
}, {
id: 2, id: 2,
label: '成本价', label: '成本价',
type: 'digit', type: 'digit',
holder: '请填写成本价', holder: '请填写成本价',
model: 'cost' model: 'cost',
require: true,
}, },
{ {
id: 3, id: 3,
label: '价', label: '批发价',
type: 'digit', type: 'digit',
holder: '请填写原价', holder: '请填写批发价',
model: 'ot_price' model: 'ot_price',
}, require: true,
{ }
id: 5, ],
label: '商品条码', moreThanList: [{
type: 'input',
holder: '请填写商品条码',
model: 'bar_code'
},
{
id: 6, id: 6,
label: '重量', label: '重量',
type: 'digit', type: 'digit',
holder: '请输入重量', holder: '请输入重量',
model: 'weight' model: 'weight',
require: false,
}, },
{ {
id: 7, id: 7,
label: '体积', label: '体积',
type: 'digit', type: 'digit',
holder: '请输入体积', holder: '请输入体积',
model: 'volume' model: 'volume',
require: false,
},
{
id: 5,
label: '商品条码',
type: 'input',
holder: '请填写商品条码',
model: 'bar_code',
require: false,
}, },
// { // {
// id: 8, // id: 8,
@ -111,6 +118,7 @@
handler(val, old) { handler(val, old) {
this.singleSpecification = val; this.singleSpecification = val;
this.saveSingleSpecification(); this.saveSingleSpecification();
this.$emit('updateCode', val.bar_code);
}, },
deep: true deep: true
}, },
@ -148,7 +156,7 @@
} }
}) })
} }
this.singleSpecification.bar_code = this.$props.bar_code; this.singleSpecification.bar_code = this.$props.bar_code + '';
// if (!this.$props.product_id) { // if (!this.$props.product_id) {
// this.formList.push({ // this.formList.push({
// id: 10, // id: 10,
@ -171,7 +179,7 @@
spliceMoreThan() { spliceMoreThan() {
this.moreThanFlag = true; this.moreThanFlag = true;
// this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length); // this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length);
this.formList.splice(2, this.formList.length); this.formList.splice(4, this.formList.length);
}, },
input(val) { input(val) {
this.singleSpecification = val this.singleSpecification = val

View File

@ -271,6 +271,8 @@
if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位'); if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<0)return Toast('价格不能小于0'); if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<0)return Toast('价格不能小于0');
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0'); if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
if(!postData.attrValue[0]?.cost||postData.attrValue[0]?.cost<0)return Toast('成本价不能小于0');
if(!postData.attrValue[0]?.ot_price||postData.attrValue[0]?.ot_price<0)return Toast('批发价不能小于0');
// if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast(''); // if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast('');
// if(!postData.content.image||postData.content.image?.length<=0)return Toast(''); // if(!postData.content.image||postData.content.image?.length<=0)return Toast('');
// return Toast(''); // return Toast('');

View File

@ -1,12 +1,12 @@
<template> <template>
<view class="input_content"> <view class="input_content">
<view class="input_content_textarea"> <!-- <view class="input_content_textarea">
<textarea v-model="prodectContent.store_name" placeholder="请输入商品详情" placeholder-class="placeholderStyle" <textarea v-model="prodectContent.store_name" placeholder="请输入商品详情" placeholder-class="placeholderStyle"
:maxlength="maxLength" /> :maxlength="maxLength" />
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text <view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
v-else>0</text>/{{maxLength}}</view> v-else>0</text>/{{maxLength}}</view>
</view> </view> -->
<view class="input_content_photo"> <view class="input_content_photo">
<view class="input_content_photo_adPh" v-for="(item, index) in prodectContent.imageList" :key="index"> <view class="input_content_photo_adPh" v-for="(item, index) in prodectContent.imageList" :key="index">

View File

@ -2,6 +2,7 @@
<view class="container_input"> <view class="container_input">
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index" @click="selectItem(item)" v-if="!item.DoNotShow"> <view class="container_input_item" v-for="(item, index) in platformClassification" :key="index" @click="selectItem(item)" v-if="!item.DoNotShow">
<view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'"> <view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
<view v-if="item.require" style="color: #e93323;">*</view>
<view class="container_input_item_label"> <view class="container_input_item_label">
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)" v-if="Object.keys(item).indexOf('select') != -1"> <text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)" v-if="Object.keys(item).indexOf('select') != -1">
<text v-if="item.select" class="iconfont">&#xe646;</text> <text v-if="item.select" class="iconfont">&#xe646;</text>

View File

@ -1084,6 +1084,7 @@
that.cartArr[4].title = that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%` `结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
// console.log(res.data);
if (res.data.order[0].credit_buy == 1 && (this.type_id == 12||this.type_id == 10||this.type_id == 17) && (res.data.order_type==99||res.data.order_type==98)) { if (res.data.order[0].credit_buy == 1 && (this.type_id == 12||this.type_id == 10||this.type_id == 17) && (res.data.order_type==99||res.data.order_type==98)) {
this.cartArr[4].payStatus = 1 this.cartArr[4].payStatus = 1
} else { } else {