|
@@ -80,13 +80,6 @@ class Drafts extends Component {
|
|
componentDidShow() { // 对应onShow,只有在onShow中才会监听到当前页面的改变
|
|
componentDidShow() { // 对应onShow,只有在onShow中才会监听到当前页面的改变
|
|
let pages = Taro.getCurrentPages();
|
|
let pages = Taro.getCurrentPages();
|
|
let currPage = pages[pages.length - 1]; // 获取当前页面
|
|
let currPage = pages[pages.length - 1]; // 获取当前页面
|
|
- // this.setState({
|
|
|
|
- // orderName: currPage.data.name,
|
|
|
|
- // contractNo: currPage.data.contractNo,
|
|
|
|
- // orderNo: currPage.data.orderNo,
|
|
|
|
- // debitId: currPage.data.debitId,
|
|
|
|
- // totalAmount: currPage.data.totalAmount || 0,
|
|
|
|
- // })
|
|
|
|
const { data } = this.state
|
|
const { data } = this.state
|
|
const obj = {
|
|
const obj = {
|
|
buyerName: currPage.data.name || data.buyerName,
|
|
buyerName: currPage.data.name || data.buyerName,
|
|
@@ -324,7 +317,6 @@ class Drafts extends Component {
|
|
icon: 'none'
|
|
icon: 'none'
|
|
})
|
|
})
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
- console.log("zzz")
|
|
|
|
this.setState({
|
|
this.setState({
|
|
isShow: true
|
|
isShow: true
|
|
})
|
|
})
|
|
@@ -350,7 +342,7 @@ class Drafts extends Component {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ // 提交申请
|
|
onSubmit() {
|
|
onSubmit() {
|
|
const { data, bankData } = this.state
|
|
const { data, bankData } = this.state
|
|
if (data.type == 1) {
|
|
if (data.type == 1) {
|
|
@@ -390,8 +382,8 @@ class Drafts extends Component {
|
|
attachmentUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","), // 附件
|
|
attachmentUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","), // 附件
|
|
payDep: (data.type == 4 || data.type == 5) ? undefined : data.payDep, // 支付部门(借支抵扣不需要)
|
|
payDep: (data.type == 4 || data.type == 5) ? undefined : data.payDep, // 支付部门(借支抵扣不需要)
|
|
orderNo: (data.type == 4 || data.type == 5) ? undefined : data.orderNo, // 订单编号(借支抵扣不需要)
|
|
orderNo: (data.type == 4 || data.type == 5) ? undefined : data.orderNo, // 订单编号(借支抵扣不需要)
|
|
- debitId: (data.type == 4 || data.type == 5) ? undefined : data.debitId, // 预支单
|
|
|
|
- eaaid: data.type != 3 ? bankData.id : undefined, // 报销账户(第三方付款不需要)
|
|
|
|
|
|
+ debitId: data.type == 4 ? undefined : data.debitId, // 预支单
|
|
|
|
+ eaaid: data.type == 3 ? undefined : bankData.id, // 报销账户(第三方付款不需要)
|
|
// 差旅费
|
|
// 差旅费
|
|
userNames: data.type == 1 ? data.userNames : undefined, // 公出客户名称
|
|
userNames: data.type == 1 ? data.userNames : undefined, // 公出客户名称
|
|
districtName: data.type == 1 ? data.districtName : undefined, // 公出地点
|
|
districtName: data.type == 1 ? data.districtName : undefined, // 公出地点
|
|
@@ -831,7 +823,7 @@ class Drafts extends Component {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
{
|
|
{
|
|
- data.type != 4 && data.type != 5 &&
|
|
|
|
|
|
+ data.type != 4 &&
|
|
<View className="formItem">
|
|
<View className="formItem">
|
|
<View className="formName">预借支:</View>
|
|
<View className="formName">预借支:</View>
|
|
<View className="formValue"
|
|
<View className="formValue"
|
|
@@ -843,7 +835,9 @@ class Drafts extends Component {
|
|
>
|
|
>
|
|
{!data.debitId
|
|
{!data.debitId
|
|
? <Button size='mini' type='primary' style={{ marginRight: 0 }}>选择借支订单</Button>
|
|
? <Button size='mini' type='primary' style={{ marginRight: 0 }}>选择借支订单</Button>
|
|
- : <View>{`已选择${data.debitTotalAmount}元借支订单`}<AtIcon value="chevron-right" size="20" color="#000000" /></View>}
|
|
|
|
|
|
+ : <View>已选择<Text style={{ color: "red" }}>{data.debitTotalAmount}</Text>元借支订单
|
|
|
|
+ <AtIcon value="chevron-right" size="20" color="#000000" />
|
|
|
|
+ </View>}
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
}
|
|
}
|