|

楼主 |
发表于 2019-4-24 14:36:05
|
显示全部楼层
js 代码
codeShenChengDaTi() {
let regeneratorRuntime = require('$UI/wxsys/comps/code/generator/runtime-module');
'use strict';
var code = function() {
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
var zhangjieTiHao, arrZjTh, tihao, zhangjieTH, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _item_loopActivity1;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
zhangjieTiHao = this.comp('restData2').getValue("fzhangjieth", undefined);
arrZjTh = wx.String.splitAndTrim(zhangjieTiHao, ",");
tihao = 0;
zhangjieTH = null;
_iteratorNormalCompletion = true;
_didIteratorError = false;
_iteratorError = undefined;
_context.prev = 7;
_iterator = arrZjTh[Symbol.iterator]();
case 9:
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
_context.next = 20;
break;
}
_item_loopActivity1 = _step.value;
zhangjieTH = arrZjTh[_item_loopActivity1];
_context.next = 14;
return this.comp('wxapi').showToast({
"title": arrZjTh[1],
"duration": 2000
});
case 14:
tihao = tihao + 1;
_context.next = 17;
return this.comp('restData4').newData({
"defaultValues": [{
"fid": this.$compRefs.restData.current.fyuzhong + " - " + this.$compRefs.restData.current.fkemu + wx.String.substring(this.$compRefs.restData1.current.fyonghuid, 0, 2) + wx.String.substring(this.$compRefs.restData1.current.fyonghuid, 32, 36) + " - " + wx.String.zeros(zhangjieTH, 5, false),
"fyonghuid": this.$compRefs.restData1.current.fyonghuid,
"ftimuid": this.$compRefs.restData.current.fyuzhong + this.$compRefs.restData.current.fkemu + "-Th" + wx.String.zeros(zhangjieTH, 4, false),
"fdatiid": zhangjieTH,
"f_zhangjid": this.$compRefs.tableData.current.fzancun,
"ftihao": tihao
}]
});
case 17:
_iteratorNormalCompletion = true;
_context.next = 9;
break;
case 20:
_context.next = 26;
break;
case 22:
_context.prev = 22;
_context.t0 = _context['catch'](7);
_didIteratorError = true;
_iteratorError = _context.t0;
case 26:
_context.prev = 26;
_context.prev = 27;
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
case 29:
_context.prev = 29;
if (!_didIteratorError) {
_context.next = 32;
break;
}
throw _iteratorError;
case 32:
return _context.finish(29);
case 33:
return _context.finish(26);
case 34:
this.comp('restData2').setValue("fshifouscdt", "true", undefined);
_context.next = 37;
return this.comp('restData2').saveAllData();
case 37:
_context.next = 39;
return this.comp('restData4').saveAllData();
case 39:
return _context.abrupt('return');
case 40:
case 'end':
return _context.stop();
}
}
}, _callee, this, [
[7, 22, 26, 34],
[27, , 29, 33]
]);
}));
return function code() {
return _ref.apply(this, arguments);
};
}();
function _asyncToGenerator(fn) {
return function() {
var gen = fn.apply(this, arguments);
return new Promise(function(resolve, reject) {
function step(key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
return Promise.resolve(value).then(function(value) {
step("next", value);
}, function(err) {
step("throw", err);
});
}
}
return step("next");
});
};
}
//当前函数的代码为自动生成,请勿手动修改!!!
var iterator = require('$UI/wxsys/comps/tableData/iterator').default;
return code.apply(this, arguments);
} |
|