1
This commit is contained in:
@@ -18,6 +18,14 @@
|
||||
<view><input type="number" v-model="form.number" @input="handleInputChange" placeholder="请填写数量"
|
||||
data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>规格型号</view>
|
||||
<view><input v-model="form.ggxh" placeholder="请填写规格型号" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between">
|
||||
<view>单位</view>
|
||||
<view><input v-model="form.dw" placeholder="请填写单位" data-key="mobile" /></view>
|
||||
</view>
|
||||
<view class="Box_box flex-between" @click="showpicker = true">
|
||||
<view class="Box_boxlang Box_box_bouttme_item_O">*发票类型</view>
|
||||
<view class="Box_box_bouttme_item_T">
|
||||
@@ -91,7 +99,9 @@
|
||||
mcc: uni.cache.get('keyword').code,
|
||||
dlzh: '',
|
||||
dlzhid: "",
|
||||
is_new: 1
|
||||
is_new: 1,
|
||||
ggxh: '',
|
||||
dw: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -161,7 +171,7 @@
|
||||
this.subCategoryList = []
|
||||
}
|
||||
},
|
||||
showpickerconfirm(e) {
|
||||
async showpickerconfirm(e) {
|
||||
if (this.form.price == null || this.form.price == '') {
|
||||
uni.showToast({
|
||||
title: '请输入开票金额',
|
||||
@@ -188,20 +198,15 @@
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/se',
|
||||
data: {
|
||||
//参数
|
||||
amount: this.form.price,
|
||||
se_amount: this.form.se_amount
|
||||
},
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
this.form.tax_amount = res.data.data.tx
|
||||
this.form.d_price = res.data.data.d_amount
|
||||
this.showpicker = false;
|
||||
}
|
||||
});
|
||||
let res = await this.api.storese({
|
||||
amount: this.form.price,
|
||||
se_amount: this.form.se_amount
|
||||
})
|
||||
if (res) {
|
||||
this.form.tax_amount = res.data.tx
|
||||
this.form.d_price = res.data.d_amount
|
||||
this.showpicker = false;
|
||||
}
|
||||
},
|
||||
Issuedbyconfirm(e) {
|
||||
this.Issuedbyshowpicker = false
|
||||
@@ -266,37 +271,27 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
uni.request({
|
||||
url: uni.conf.baseUrl + 'store/subinvoicing',
|
||||
data: this.form,
|
||||
method: 'POST', //请求方式,必须为大写
|
||||
success: res => {
|
||||
console.log(res)
|
||||
this.form = {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: uni.cache.get('keyword').name,
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
mcc: uni.cache.get('keyword').code,
|
||||
dlzh: '',
|
||||
is_new:1
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.data.message || res.data.msg,
|
||||
icon: "none",
|
||||
})
|
||||
setTimeout(datalange => {
|
||||
uni.pro.navigateTo('index/wxinvoicing', res.data.data.invoice_records)
|
||||
}, 2000)
|
||||
|
||||
let res = await this.api.storesubinvoicing(this.form)
|
||||
if (res) {
|
||||
this.form = {
|
||||
store_id: uni.getStorageSync('userId'),
|
||||
article: uni.cache.get('keyword').name,
|
||||
type: '',
|
||||
price: '',
|
||||
se_amount: '',
|
||||
number: '',
|
||||
tax_amount: '',
|
||||
d_price: '',
|
||||
notes: '',
|
||||
mcc: uni.cache.get('keyword').code,
|
||||
dlzh: '',
|
||||
is_new: 1,
|
||||
ggxh: '',
|
||||
dw: ''
|
||||
}
|
||||
uni.pro.navigateTo('index/wxinvoicing', res.data.invoice_records)
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user