"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                             */
;/* empty css                                                                    */
;/* empty css                                                                         */
;/* empty css                                                                */
;/* empty css                                                                     */
;/* empty css                                                                  */
;/* empty css                                                               */
;/* empty css                                                                  */
;/* empty css                                                                        */
;/* empty css                                                                  */
;/* empty css                                                                 */
;/* empty css                                                                       */
;/* empty css                                                                        */
;/* empty css                                                                     */
;/* empty css                                                                 */
const Vue = require("vue");
const common = require("../../utils/common.js");
require("../../utils/eventBus.js");
const ValueSelector = require("../../../components/ValueSelector.vue.js");
const index = require("../../../api/index.js");
const ParamsConfig = require("../../../components/ParamsConfig.vue2.js");
;/* empty css               */
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
const index$1 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
const index$2 = require("../../../../../node_modules/element-plus/es/components/form/index.js");
const index$3 = require("../../../../../node_modules/element-plus/es/components/input/index.js");
const index$4 = require("../../../../../node_modules/element-plus/es/components/radio/index.js");
const index$5 = require("../../../../../node_modules/element-plus/es/components/select/index.js");
const _sfc_main = {
  __name: "contract",
  setup(__props) {
    const currentInstance = Vue.getCurrentInstance();
    const ctx = currentInstance.proxy;
    const currentItem = Vue.computed(() => {
      return common.getCurrentItem();
    });
    const activeName = Vue.ref(["common"]);
    const scenarioOptions = Vue.ref([]);
    index.default.getModeNoList4Cont(ctx.$http).then((data) => {
      scenarioOptions.value = data.map((item) => ({
        label: item.modeName,
        value: item.modeNo
      }));
    });
    return (_ctx, _cache) => {
      const _component_el_input = index$3.ElInput;
      const _component_el_form_item = index$2.ElFormItem;
      const _component_el_radio_button = index$4.ElRadioButton;
      const _component_el_radio_group = index$4.ElRadioGroup;
      const _component_el_option = index$5.ElOption;
      const _component_el_select = index$5.ElSelect;
      const _component_el_form = index$2.ElForm;
      const _component_el_collapse_item = index$1.ElCollapseItem;
      const _component_el_collapse = index$1.ElCollapse;
      return Vue.openBlock(), Vue.createBlock(_component_el_collapse, {
        class: "setting",
        modelValue: activeName.value,
        "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => activeName.value = $event)
      }, {
        default: Vue.withCtx(() => [
          Vue.createVNode(_component_el_collapse_item, {
            name: "common",
            title: "基本属性"
          }, {
            default: Vue.withCtx(() => [
              Vue.createVNode(_component_el_form, {
                "label-position": "top",
                "label-width": "auto",
                model: currentItem.value
              }, {
                default: Vue.withCtx(() => [
                  Vue.createVNode(_component_el_form_item, {
                    label: "标题",
                    required: ""
                  }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(_component_el_input, {
                        modelValue: currentItem.value.label,
                        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentItem.value.label = $event)
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  Vue.createVNode(_component_el_form_item, { label: "合同模式" }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(_component_el_radio_group, {
                        modelValue: currentItem.value.mode,
                        "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => currentItem.value.mode = $event),
                        size: "small"
                      }, {
                        default: Vue.withCtx(() => [
                          Vue.createVNode(_component_el_radio_button, { value: "view" }, {
                            default: Vue.withCtx(() => _cache[8] || (_cache[8] = [
                              Vue.createTextVNode("合同查看")
                            ])),
                            _: 1
                          }),
                          Vue.createVNode(_component_el_radio_button, { value: "make" }, {
                            default: Vue.withCtx(() => _cache[9] || (_cache[9] = [
                              Vue.createTextVNode("合同制作")
                            ])),
                            _: 1
                          }),
                          Vue.createVNode(_component_el_radio_button, { value: "sign" }, {
                            default: Vue.withCtx(() => _cache[10] || (_cache[10] = [
                              Vue.createTextVNode("合同签署")
                            ])),
                            _: 1
                          })
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  Vue.createVNode(_component_el_form_item, {
                    label: "业务主键",
                    required: ""
                  }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(ValueSelector.default, {
                        modelValue: currentItem.value.busNo,
                        "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => currentItem.value.busNo = $event),
                        multiple: false,
                        size: "default",
                        placeholder: "选择业务主键"
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  Vue.createVNode(_component_el_form_item, {
                    label: "合同编号(contNo)",
                    required: ""
                  }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(ValueSelector.default, {
                        modelValue: currentItem.value.contNo,
                        "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => currentItem.value.contNo = $event),
                        multiple: false,
                        size: "default",
                        placeholder: "选择合同编号"
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  Vue.createVNode(_component_el_form_item, { label: "业务场景" }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(_component_el_select, {
                        modelValue: currentItem.value.busSubject,
                        "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => currentItem.value.busSubject = $event),
                        placeholder: "选择业务场景",
                        style: { "width": "100%" },
                        clearable: ""
                      }, {
                        default: Vue.withCtx(() => [
                          (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(scenarioOptions.value, (scene) => {
                            return Vue.openBlock(), Vue.createBlock(_component_el_option, {
                              key: scene.value,
                              label: scene.label,
                              value: scene.value
                            }, null, 8, ["label", "value"]);
                          }), 128))
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  Vue.createVNode(_component_el_form_item, { label: "合同模板生成方式" }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(_component_el_radio_group, {
                        modelValue: currentItem.value.genType,
                        "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => currentItem.value.genType = $event),
                        size: "small"
                      }, {
                        default: Vue.withCtx(() => [
                          Vue.createVNode(_component_el_radio_button, { value: "1" }, {
                            default: Vue.withCtx(() => _cache[11] || (_cache[11] = [
                              Vue.createTextVNode("系统生成")
                            ])),
                            _: 1
                          }),
                          Vue.createVNode(_component_el_radio_button, { value: "2" }, {
                            default: Vue.withCtx(() => _cache[12] || (_cache[12] = [
                              Vue.createTextVNode("手动选择")
                            ])),
                            _: 1
                          })
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  }),
                  Vue.createVNode(_component_el_form_item, { label: "业务参数" }, {
                    default: Vue.withCtx(() => [
                      Vue.createVNode(ParamsConfig.default, {
                        modelValue: currentItem.value.params,
                        "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => currentItem.value.params = $event)
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["model"])
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["modelValue"]);
    };
  }
};
const contract = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-7ebeb42d"]]);
exports.default = contract;
