|
|
@@ -22,7 +22,7 @@ import { putStorageSync, getStorageSync } from '../../utils/util'
|
|
|
// }
|
|
|
import { cancelEnrollmentImpl, getRequirementDetailImpl } from '../../service/impl/hwRequirement.impl'
|
|
|
// import { cancelEnrollmentImpl, enrollmentRequireImpl, getRequirementDetailImpl } from '../../service/impl/hwRequirement.impl'
|
|
|
-import { confirmOrderImpl, getOrderDetailImpl, confirmECOrdersImpl} from '../../service/impl/hwOrder.impl'
|
|
|
+import { confirmOrderImpl, getOrderDetailImpl, confirmECOrdersImpl } from '../../service/impl/hwOrder.impl'
|
|
|
import { getHwUserInfo } from '../../utils/util'
|
|
|
Page({
|
|
|
|
|
|
@@ -50,6 +50,7 @@ Page({
|
|
|
hwOrderAPI: {
|
|
|
workContractType: -1,
|
|
|
workContract: '',
|
|
|
+ otherAgreement: '',
|
|
|
id: 0,
|
|
|
status: -1
|
|
|
},
|
|
|
@@ -252,31 +253,35 @@ Page({
|
|
|
*/
|
|
|
buttonSubmit() {
|
|
|
const workContractType = this.data.hwOrderAPI.workContractType;
|
|
|
+ const otherAgreement = this.data.hwOrderAPI.otherAgreement;
|
|
|
if (this.data.userInfo.authenticationStatus === 1) {
|
|
|
+ this.selectComponent('.protocolConfirmationView').open({
|
|
|
+ content: otherAgreement, callback: () => {
|
|
|
+ // 电子合同确认订单
|
|
|
+ workContractType === 1 && confirmECOrdersImpl({
|
|
|
+ orderId: this.data.hwOrderAPI.id
|
|
|
+ }).then(res => {
|
|
|
+ wx.openEmbeddedMiniProgram({
|
|
|
+ appId: 'wxa023b292fd19d41d',
|
|
|
+ path: "/" + res.data.url
|
|
|
+ });
|
|
|
+ })
|
|
|
|
|
|
- // 电子合同确认订单
|
|
|
- workContractType === 1 && confirmECOrdersImpl({
|
|
|
- orderId: this.data.hwOrderAPI.id
|
|
|
- }).then(res => {
|
|
|
- wx.openEmbeddedMiniProgram({
|
|
|
- appId: 'wxa023b292fd19d41d',
|
|
|
- path: "/" + res.data.url
|
|
|
- });
|
|
|
- })
|
|
|
-
|
|
|
- // 非电子合同
|
|
|
- workContractType === 0 && confirmOrderImpl({
|
|
|
- orderId: this.data.hwOrderAPI.id
|
|
|
- }).then(res => {
|
|
|
- if (res.errCode === 0) {
|
|
|
- wx.showToast({
|
|
|
- title: '订单已确认',
|
|
|
- success: () => {
|
|
|
- // 确认成功后 更改按钮状态
|
|
|
- const hwOrderAPI = this.data.hwOrderAPI;
|
|
|
- hwOrderAPI.status = 2;
|
|
|
- this.setData({
|
|
|
- hwOrderAPI
|
|
|
+ // 非电子合同
|
|
|
+ workContractType === 0 && confirmOrderImpl({
|
|
|
+ orderId: this.data.hwOrderAPI.id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.errCode === 0) {
|
|
|
+ wx.showToast({
|
|
|
+ title: '订单已确认',
|
|
|
+ success: () => {
|
|
|
+ // 确认成功后 更改按钮状态
|
|
|
+ const hwOrderAPI = this.data.hwOrderAPI;
|
|
|
+ hwOrderAPI.status = 2;
|
|
|
+ this.setData({
|
|
|
+ hwOrderAPI
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
})
|