<template>
  <view class="addAndEditProduct-container">
    <navBar
      class="nav-bar"
      :statusBar="true"
      :border="false"
      :fixed="true"
      :height="'44px'"
      rightWidth="0"
      :leftWidth="30"
      title="编辑分类"
      backgroundColor="#fff"
    >
      <block slot="left">
        <u-icon
          name="arrow-left"
          color="#000"
          size="20"
          @click="pageBack()"
        ></u-icon>
      </block>
    </navBar>
    <view class="addAndEditProduct-content">
      <u--form
        labelPosition="left"
        :model="form"
        ref="uForm"
        label-width="100"
        :rules="rules"
      >
        <u-form-item label="商品名称" prop="product_name" class="form-item">
          <u--input
            v-model="form.product_name"
            placeholder="有输入商品名称"
            border="none"
          ></u--input>
        </u-form-item>
        <u-form-item
          label="商品分类"
          prop="type_category_name"
          class="form-item"
          @click="hadnerShowClassifyListPopup()"
        >
          <u--input
            v-model="form.type_category_name"
            disabled
            disabledColor="#ffffff"
            placeholder="请选择商品分类"
            border="none"
            @click="hideKeyboard()"
          ></u--input>
          <u-icon slot="right" name="arrow-right"></u-icon>
        </u-form-item>
      </u--form>
    </view>
    <u-toast ref="uToast"></u-toast>
  </view>
</template>

<script>
import navBar from "@/components/uni-nav-bar/uni-nav-bar";
export default {
  name: "addAndEditProduct",
  props: {
    productItem: {
      type: Object,
      default: {},
    },
  },
  components: {
    navBar,
  },
  data() {
    return {
      form: {
        product_video: "",
        product_buy_limit: undefined,
        product_sale_time: "",
        product_number: "",
        product_name: "", // 商品名称
        kind_id: 1201,
        product_inventory_lock: 1001,
        payment_type_id: 0,
        product_state_id: 1001,
        contract_type_ids: [],
        product_transport_id: [],
        transport_type_id: undefined,
        store_category_ids: [],
        product_service: "",
        product_param: "",
        product_detail: "",
        product_id: undefined,
        product_tips: "",
        voucher_activity_id: "",
        category_id: "",
        category_name: "",
      },
    };
  },
  computed: {},
  onLoad: function (options) {},
  onReady() {},
  onShow() {
    // this.classifyItem = form;
  },

  mounted() {},
  methods: {
    pageBack() {
      this.$emit("pageBack");
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/styles/variables.scss";

.addAndEditProduct-container {
}
</style>
