diff --git a/api/purchase_product_offer.js b/api/purchase_product_offer.js
index cdbb500..83785e3 100644
--- a/api/purchase_product_offer.js
+++ b/api/purchase_product_offer.js
@@ -9,4 +9,7 @@ export const purchaseProductOfferUpdate = (data) => {
}
export const purchaseProductOfferOutboundFloatingLv = (data) => {
return request.get('/purchase_product_offer/purchaseproductoffer/outbound_floating_lv', data);
+}
+export const supplierListApi = (data) => {
+ return request.get('/purchase_product_offer/purchaseproductoffer/supplier', data);
}
\ No newline at end of file
diff --git a/pageQuota/purchase_product_offer/index.vue b/pageQuota/purchase_product_offer/index.vue
index b60511f..64bb03f 100644
--- a/pageQuota/purchase_product_offer/index.vue
+++ b/pageQuota/purchase_product_offer/index.vue
@@ -36,8 +36,8 @@
@@ -47,37 +47,49 @@
+
+
+
+ {{supplierText}}
+
+
+
-
+
{{formData.unit_name}}
-
+
-
-
-
- {{pickerText}}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -90,6 +102,7 @@
reactive,
} from "vue"
import {
+ supplierListApi,
purchaseProductOfferLists,
purchaseProductOfferUpdate,
purchaseProductOfferOutboundFloatingLv
@@ -103,22 +116,26 @@
})
}
const show = ref(false)
+ const showSupplier = ref(false)
+ const supplierText = ref('')
const pickerText = ref('')
const picker_price = ref(0)
const pickerShow = ref(false)
const formData = ref({
- "id": '',
- "store_name": '',
- 'product_id': '',
- 'nums': '',
- 'price': '',
- 'total_price': '',
- 'outbound_price': '',
- 'unit_name': '',
- 'pay_type':1
+ id: '',
+ bhoid: '',
+ supplier_id: '',
+ purchase: '',
+ total_price: '',
+ buyer_nums: 0,
+ package: '',
+ store_info: '',
+ marques: '',
+ after_sales: '',
+ pay_type: 1
})
// tabsindex
- const radiolist1=ref([{name:'赊账'},{name:'现金'}])
+ const radiolist1=ref([{name:'赊账', value: 1},{name:'现金', value: 2}])
const radio_value=ref('赊账')
const tabIndex = ref(1)
const {
@@ -144,6 +161,17 @@
let res = await purchaseProductOfferLists(where.value)
goodsList1.value = res.data.lists
}
+ const supplierList = ref([])
+ const getSupplierList = () => {
+ supplierListApi().then(res => {
+ supplierList.value = [res.data.lists]
+ })
+ }
+ const supplierConfirm = (e) => {
+ showSupplier.value = false
+ supplierText.value = e.value[0].mer_name
+ formData.value.supplier_id = e.value[0].id
+ }
const cancleOrder = (item) => {
columns.value[0].forEach(e => {
if (e['name_b'] == item['category_name']) {
@@ -154,9 +182,38 @@
show.value = true
formData.value.store_name = item['store_name']
formData.value.id = item['id']
- formData.value.nums = item['need_num']
+ formData.value.bhoid = item.order_id
+ formData.value.buyer_nums = item['need_num']
formData.value.product_id = item['product_id']
formData.value.unit_name = item['unit_name']
+ 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
+ if (item.pay_type == 1) {
+ radio_value.value = '赊账'
+ } else {
+ radio_value.value = '现金'
+ }
+ } else {
+ 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 = () => {
purchaseProductOfferUpdate(formData.value).then(res => {
@@ -166,16 +223,13 @@
})
}
const changeInputPrice = (e) => {
- if (formData.value.nums > 0 && formData.value.price > 0) {
- formData.value.total_price = (formData.value.nums * formData.value.price).toFixed(2)
- if (picker_price.value > 0) {
- let outbound_price = (formData.value.price * picker_price.value)
- formData.value.outbound_price = (parseInt(formData.value.price) + outbound_price).toFixed(2)
- }
+ if (formData.value.buyer_nums > 0 && formData.value.purchase > 0) {
+ formData.value.total_price = (formData.value.buyer_nums * formData.value.purchase).toFixed(2)
}
}
const sectionChange = (index) => {
where.value.buyer_confirm = index
+ goodsList1.value = []
getGoodsList()
}
const columns = ref([]);
@@ -192,13 +246,14 @@
}
const radioChange=(e)=>{
if(e=='赊账'){
- formData.pay_type=1
+ formData.value.pay_type = 1
}else{
- formData.pay_type=2
+ formData.value.pay_type = 2
}
}
getGoodsList()
OutboundFloatingLv()
+ getSupplierList()