Browse Source

修改问题

devlop
杨阁辉 4 years ago
parent
commit
59ebc8709c
2 changed files with 19 additions and 12 deletions
  1. 30
      pages/add-paper/index.vue
  2. 1
      pages/mall/index.vue

30
pages/add-paper/index.vue

@ -57,12 +57,20 @@
<text class="add-paper-start"><uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons></text>
<text class="add-paper-text">纸种信息</text>
</view>
<qn-easyinput
type="text"
:styles="{ disableColor: '#fff' }"
v-model="form.categoryName"
:inputBorder="false"
text="right"
placeholder="请输入纸种信息"
></qn-easyinput>
<!-- categoryId -->
<view class="" @click="paperpopupShow()">
<!-- <view class="" @click="paperpopupShow()">
<text v-if="form.categoryId === null" class="add-paph-text">请选择纸种信息</text>
<text v-else>{{ form.categoryName }}</text>
<text><uni-icons type="right" color="#000000" size="18"></uni-icons></text>
</view>
</view> -->
</view>
<view class="add-paper-border"></view>
<view class="add-paper-list">
@ -285,7 +293,7 @@ import { back, go2, uploadFile } 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, getSupplierDteail, updateProduct } from '@/apis/add-paper.js'
const validateFields = ['name', 'isMainProductRep', 'manufacturerName', 'brandName', 'categoryId']
const validateFields = ['name', 'isMainProductRep', 'manufacturerName', 'brandName', 'categoryName']
const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight']
export default {
components: {
@ -300,7 +308,7 @@ export default {
isMainProductRep: 0,
manufacturerName: null,
brandName: null,
categoryId: null
categoryName: null
},
imageStyles: {
width: 100,
@ -372,7 +380,7 @@ export default {
},
paperSelectChange(item) {
this.$set(this.form, 'categoryName', item.name)
this.$set(this.form, 'categoryId', item.id)
// this.$set(this.form, 'categoryId', item.id)
this.$refs.paperpopup.close()
},
paperpopupShow() {
@ -400,11 +408,11 @@ export default {
this.skuList[j].isPromoting = 1
}
}
for(let x =0;x<this.paperList.length;x++){
if(this.paperList[x].id === this.form.categoryId){
this.$set(this.form,'categoryName',this.paperList[x].name)
}
}
// for(let x =0;x<this.paperList.length;x++){
// if(this.paperList[x].id === this.form.categoryId){
// this.$set(this.form,'categoryName',this.paperList[x].name)
// }
// }
this.imgList = []
for (let i = 0; i < res.imgList.length; i++) {
var params = {
@ -427,7 +435,7 @@ export default {
stock: null,
stockUnit: '1',
weight: null,
categoryId: null
categoryName: null
})
},
//

1
pages/mall/index.vue

@ -113,7 +113,6 @@ export default {
return new Promise((resolve, reject) => {
SupplierList({ ...this.orderPagination })
.then(res => {
console.log('纸品列表', res)
if (res) {
if (res.records.length === 0) {
this.pageShow = false

Loading…
Cancel
Save