createBill.js 1.11 KB
Newer Older
wangcong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
import typesBill from "../components-control/typesBill.vue";
import {getUUID} from './util/lib.js'
export default {
  execute(context, param) {
    GMS.queryObject = {//上张下张用
      currentDataQueryConditionSet: context.currentDataQueryConditionSet,
      index:  -1,
      templateName:param.viewName,
      isReadOnly:false
    }
    let templateName = null;
    if (Object.prototype.toString.call(param) === "[object Array]") {
      templateName = param[0];
    } else {
      templateName = param.viewName;
    }
    if (
      window.osConfig.appOpenMode &&
      window.osConfig.appOpenMode == "apploader"
    ) {
      GMS.$hideContainer.$portalAPI.emit(
        "open-new-page", //打开一个新的页签
        getUUID(),
        "runner-bill-form",
        {
          templateName: templateName,
        },
        {
          openWay: "FUNCTAB",
          title: "创建单据",
        }
      );
    }else{
      GMS.$hideContainer.addComponent(typesBill, {}, function (c) {
        c.templateName = templateName
        c.init = true;
        c.modal_visible = true;
        c.state = ''
      })
    }
  },
 
};