| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- // pages/voyageManage/myBills/myBills.js
- const app = getApp()
- const {
- postApi
- } = require("../../../apis/api")
- Page({
- data: {
- medias: [],
- voyageId: 0,
- trans: '',
- },
- check(e) {
- let arr = this.data.currentBillItem.shipownerUploadFiles
- let {
- index,
- index: checkedIndex
- } = e.currentTarget.dataset
- // arr[index].checked = arr[index].checked ? false : true
- for (let i in arr) {
- if (i == checkedIndex) {
- arr[i].checked = true
- } else {
- arr[i].checked = false
- }
- }
- this.data.currentBillItem.shipownerUploadFiles = arr
- this.setData({
- currentBillItem: this.data.currentBillItem
- })
- },
- onLoad(options) {
- let currentBillItem = app.globalData.currentBillItem
- this.setData({
- currentBillItem,
- voyageId: options.id
- })
- },
- isTrue() {
- },
- examineMedia() {
- let arr = this.data.currentBillItem.shipownerUploadFiles
- if (!arr.some((e) => {
- return e.checked
- })) {
- wx.showToast({
- title: '至少选择一张单据',
- icon: "error"
- })
- return
- }
- wx.navigateTo({
- url: `/pages/voyageManage/myBills/examine/examine?id=${this.data.voyageId}`,
- })
- },
- onShareAppMessage() {
- }
- })
|