|
@@ -2768,6 +2768,7 @@ $(document).ready(() => {
|
|
|
$('i', obj).remove();
|
|
|
}
|
|
|
$('#im-pre').val(stage.im_pre ? stage.im_pre : '');
|
|
|
+ $('#im-start-num').val(stage.im_start_num ? stage.im_start_num : 0);
|
|
|
const typeArr = $('div[name="im-type"]');
|
|
|
for (const t of typeArr) {
|
|
|
if (parseInt($(t).attr('im-type')) === stage.im_type) {
|
|
@@ -2779,16 +2780,26 @@ $(document).ready(() => {
|
|
|
});
|
|
|
// 提交 中间计量模式
|
|
|
$('#choose-ok').click(() => {
|
|
|
+ let startNum;
|
|
|
+ try {
|
|
|
+ startNum = parseInt($('#im-start-num').val());
|
|
|
+ if (startNum <= 0) throw '请输入正整数';
|
|
|
+ } catch (err) {
|
|
|
+ toastr.error("中间计量表号起始编号请输入正整数");
|
|
|
+ return;
|
|
|
+ }
|
|
|
const chooseType = _.find($('div[name="im-type"]', '#im-type'), function (it) {
|
|
|
return it.style.cursor !== 'pointer';
|
|
|
});
|
|
|
const data = {
|
|
|
im_type: parseInt($(chooseType).attr('im-type')),
|
|
|
im_pre: $('#im-pre').val(),
|
|
|
+ im_start_num: startNum,
|
|
|
};
|
|
|
postData(window.location.pathname + '/detail/build', data, function (result) {
|
|
|
stage.im_type = data.im_type;
|
|
|
stage.im_pre = data.im_pre;
|
|
|
+ stage.im_start_num = data.im_start_num;
|
|
|
if (stage.im_type === imType.tz.value || stage.im_type === imType.bb.value) {
|
|
|
const jlCol = self.spreadSetting.cols.find(function (x) {return x.field === 'jl'});
|
|
|
jlCol.title = '本期计量金额';
|