|
|
|
@ -86,7 +86,7 @@ |
|
|
|
<view><uni-data-checkbox v-model="form.isMainProductRep" :localdata="range"></uni-data-checkbox></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="paper-price"> |
|
|
|
<view class="paper-price-main"> |
|
|
|
<text class="paper-price-title">纸品售价</text> |
|
|
|
@ -153,6 +153,40 @@ |
|
|
|
<view class="paper-price-title text-left">元/{{ item.stockUnit === 1 ? '张' : '吨' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="paper-price-item"> |
|
|
|
<view class="label"> |
|
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
|
<text class="label_text">三十天账期单价:</text> |
|
|
|
</view> |
|
|
|
<view class="label_value flex"> |
|
|
|
<qn-easyinput |
|
|
|
type="digit" |
|
|
|
:styles="{ disableColor: '#F7F8FA', borderBottom: '1px solid red' }" |
|
|
|
v-model="item.thirtyPeriodUnitPrice" |
|
|
|
:inputBorder="false" |
|
|
|
text="right" |
|
|
|
placeholder="请输入现款单价" |
|
|
|
></qn-easyinput> |
|
|
|
<view class="paper-price-title text-left">元/{{ item.stockUnit === 1 ? '张' : '吨' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="paper-price-item"> |
|
|
|
<view class="label"> |
|
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
|
<text class="label_text">六十天账期单价:</text> |
|
|
|
</view> |
|
|
|
<view class="label_value flex"> |
|
|
|
<qn-easyinput |
|
|
|
type="digit" |
|
|
|
:styles="{ disableColor: '#F7F8FA', borderBottom: '1px solid red' }" |
|
|
|
v-model="item.sixtyPeriodUnitPrice" |
|
|
|
:inputBorder="false" |
|
|
|
text="right" |
|
|
|
placeholder="请输入现款单价" |
|
|
|
></qn-easyinput> |
|
|
|
<view class="paper-price-title text-left">元/{{ item.stockUnit === 1 ? '张' : '吨' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="paper-price-item"> |
|
|
|
<view class="label"> |
|
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
|
@ -191,7 +225,7 @@ |
|
|
|
</view> |
|
|
|
<button type="primary" class="add-Btn" plain="true" @click="addPriceClick()">+ 新增售价</button> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="paper-price"> |
|
|
|
<view class="paper-price-image-title"><text class="paper-price-title">纸品图片</text></view> |
|
|
|
<view class="paper-price-image"> |
|
|
|
@ -207,7 +241,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="paper-price"> |
|
|
|
<view class="paper-price-image-title"><text class="paper-price-title">商品卖点</text></view> |
|
|
|
<view class="paper-price-image"> |
|
|
|
@ -223,7 +257,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="paper-price"> |
|
|
|
<view class="paper-price-image-title"><text class="paper-price-title">商品描述</text></view> |
|
|
|
<view class="paper-price-image"> |
|
|
|
@ -238,7 +272,7 @@ |
|
|
|
></qn-easyinput> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="paper-price"> |
|
|
|
<view class="paper-price-image-title"><text class="paper-price-title">送货说明</text></view> |
|
|
|
<view class="paper-price-image"> |
|
|
|
@ -253,7 +287,7 @@ |
|
|
|
></qn-easyinput> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="paper-price"> |
|
|
|
<view class="paper-price-image-title"><text class="paper-price-title">其他说明</text></view> |
|
|
|
<view class="paper-price-image"> |
|
|
|
@ -268,14 +302,14 @@ |
|
|
|
></qn-easyinput> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
<u-gap></u-gap> |
|
|
|
<view class="upload-btn"> |
|
|
|
<view><button type="primary" class="btn-class" plain="true" @click="addPriceClick()">取消</button></view> |
|
|
|
<view><button type="primary" class="btn-class-upload" @click="uploadPrice()">上架出售</button></view> |
|
|
|
</view> |
|
|
|
<uni-popup ref="popup" type="bottom"> |
|
|
|
<view class="popup_modal"> |
|
|
|
<slot name="title"><view class="popup_modal-title">可选择已录入公司</view></slot> |
|
|
|
<slot name="title"><view class="popup_modal-title">可选择库存单位</view></slot> |
|
|
|
<scroll-view scroll-y="true" class="popup_modal-scroll"> |
|
|
|
<view @click="selectValue(item)" class="popup_modal-scroll-item" v-for="item in searchList" :key="item.id">{{ item.name }}</view> |
|
|
|
</scroll-view> |
|
|
|
@ -294,16 +328,10 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { back, uploadFile, uploadImage } from '@/utils/hook.js' |
|
|
|
import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue' |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import { getCategoryList, createProduct, getSupplierDetail, updateProduct } from '@/apis/add-paper.js' |
|
|
|
const validateFields = ['name', 'isMainProductRep', 'manufacturerName', 'brandName', 'categoryName'] |
|
|
|
const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight'] |
|
|
|
const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight', 'thirtyPeriodUnitPrice', 'sixtyPeriodUnitPrice'] |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
uGap, |
|
|
|
qnEasyinput |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
title: '添加纸品', |
|
|
|
@ -417,7 +445,6 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.imgList = res.imgList |
|
|
|
console.log('this.imgList', this.imgList) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -471,13 +498,11 @@ export default { |
|
|
|
}, |
|
|
|
// 删除图片 |
|
|
|
deleteImage(item) { |
|
|
|
console.log('deleteImage', item) |
|
|
|
for (let i = 0; i < this.imgList.length; i++) { |
|
|
|
if (this.imgList[i].uuid === item.tempFile.uuid) { |
|
|
|
this.imgList.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(this.imgList) |
|
|
|
}, |
|
|
|
deleteVoucher(index) { |
|
|
|
this.imgList.splice(index, 1) |
|
|
|
@ -501,7 +526,7 @@ export default { |
|
|
|
} |
|
|
|
for (let validatePriceField of validatePriceFields) { |
|
|
|
for (let sku of this.skuList) { |
|
|
|
if (sku[validatePriceField] === null || sku[validatePriceField] === '') { |
|
|
|
if (sku[validatePriceField] == null || sku[validatePriceField] === '') { |
|
|
|
uni.showToast({ |
|
|
|
title: '请完善纸品售价信息', |
|
|
|
icon: 'none' |
|
|
|
@ -555,7 +580,6 @@ export default { |
|
|
|
getCategoryList().then((res) => { |
|
|
|
if (res) { |
|
|
|
this.paperList = res |
|
|
|
console.log(res) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|