Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
lewis | a7908eb0da |
|
@ -57,6 +57,9 @@
|
|||
<up-form-item label="名称">
|
||||
<up-input v-model="formData.store_name" border="none" disabled=""></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="产地">
|
||||
<up-input v-model="formData.made_place"></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="数量">
|
||||
<up-input v-model="formData.buyer_nums" @change='changeInputPrice'> <template #suffix>
|
||||
<span>{{formData.unit_name}}</span>
|
||||
|
@ -86,6 +89,12 @@
|
|||
<up-form-item label="售后">
|
||||
<up-input v-model="formData.after_sales"></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="生产日期" labelWidth='auto'>
|
||||
<up-datetime-picker hasInput :show="showManufacture" v-model="formData.manufacture" mode="date" @confirm="changeManufacture"></up-datetime-picker>
|
||||
</up-form-item>
|
||||
<up-form-item label="保质期" labelWidth='auto'>
|
||||
<up-datetime-picker hasInput :show="showExpirationDate" v-model="formData.expiration_date" mode="date" @confirm="changeExpirationDate"></up-datetime-picker>
|
||||
</up-form-item>
|
||||
</up-form>
|
||||
</up-modal>
|
||||
<up-picker :show="showSupplier" :columns="supplierList" keyName="mer_name" @confirm="supplierConfirm"
|
||||
|
@ -116,6 +125,8 @@
|
|||
})
|
||||
}
|
||||
const show = ref(false)
|
||||
const showManufacture = ref(false)
|
||||
const showExpirationDate = ref(false)
|
||||
const showSupplier = ref(false)
|
||||
const supplierText = ref('')
|
||||
const pickerText = ref('')
|
||||
|
@ -132,7 +143,10 @@
|
|||
store_info: '',
|
||||
marques: '',
|
||||
after_sales: '',
|
||||
pay_type: 1
|
||||
pay_type: 1,
|
||||
manufacture: '',
|
||||
expiration_date: '',
|
||||
made_place: ''
|
||||
})
|
||||
// tabsindex
|
||||
const radiolist1=ref([{name:'赊账', value: 1},{name:'现金', value: 2}])
|
||||
|
@ -186,17 +200,20 @@
|
|||
formData.value.buyer_nums = item['need_num']
|
||||
formData.value.product_id = item['product_id']
|
||||
formData.value.unit_name = item['unit_name']
|
||||
formData.value.package = item.package
|
||||
formData.value.store_info = item.store_info
|
||||
formData.value.marques = item.marques
|
||||
formData.value.after_sales = item.after_sales
|
||||
formData.value.made_place = item.made_place
|
||||
if (item.buyer_confirm == 1) {
|
||||
formData.value.purchase = item.price
|
||||
formData.value.buyer_nums = item.buyer_nums
|
||||
formData.value.total_price = item.total_price
|
||||
formData.value.supplier_id = item.supplier_id
|
||||
formData.value.package = item.package
|
||||
formData.value.store_info = item.store_info
|
||||
formData.value.marques = item.marques
|
||||
formData.value.after_sales = item.after_sales
|
||||
formData.value.pay_type = item.pay_type
|
||||
supplierText.value = item.supplier_name
|
||||
formData.value.manufacture = item.manufacture
|
||||
formData.value.expiration_date = item.expiration_date
|
||||
if (item.pay_type == 1) {
|
||||
radio_value.value = '赊账'
|
||||
} else {
|
||||
|
@ -206,16 +223,18 @@
|
|||
formData.value.purchase = ''
|
||||
formData.value.total_price =
|
||||
formData.value.supplier_id = ''
|
||||
formData.value.package = ''
|
||||
formData.value.store_info = ''
|
||||
formData.value.marques = ''
|
||||
formData.value.after_sales = ''
|
||||
formData.value.pay_type = 1
|
||||
supplierText.value = ''
|
||||
radio_value.value = '赊账'
|
||||
}
|
||||
}
|
||||
const offerUpdate = () => {
|
||||
if (formData.value.manufacture != '' && formData.value.manufacture.toString().length >= 13) {
|
||||
formData.value.manufacture = formData.value.manufacture / 1000
|
||||
}
|
||||
if (formData.value.expiration_date != '' && formData.value.expiration_date.toString().length >= 13) {
|
||||
formData.value.expiration_date = formData.value.expiration_date / 1000
|
||||
}
|
||||
purchaseProductOfferUpdate(formData.value).then(res => {
|
||||
uni.$u.toast(res.msg);
|
||||
show.value = false
|
||||
|
@ -227,6 +246,12 @@
|
|||
formData.value.total_price = (formData.value.buyer_nums * formData.value.purchase).toFixed(2)
|
||||
}
|
||||
}
|
||||
const changeManufacture = (e) => {
|
||||
formData.value.manufacture = e.value
|
||||
}
|
||||
const changeExpirationDate = (e) => {
|
||||
formData.value.expiration_date = e.value
|
||||
}
|
||||
const sectionChange = (index) => {
|
||||
where.value.buyer_confirm = index
|
||||
goodsList1.value = []
|
||||
|
|
Loading…
Reference in New Issue