SET NAMES utf8;

SET FOREIGN_KEY_CHECKS=0;

CREATE TABLE IF NOT EXISTS `t_customized` (
  `customized_id` int(11) NOT NULL AUTO_INCREMENT,
  `customized_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `customized_shortname` varchar(255) COLLATE utf8_bin DEFAULT '',
  `customized_title` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `customized_class` varchar(255) COLLATE utf8_bin DEFAULT '',
  `customized_content` varchar(255) COLLATE utf8_bin DEFAULT '',
  `customized_type` tinyint(1) DEFAULT NULL,
  `permission` tinyint(1) DEFAULT 0,
  `user_ids` text COLLATE utf8_bin DEFAULT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `customized_other` text COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`customized_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for t_fast_input
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_fast_input` (
  `fast_input_id` int(11) NOT NULL AUTO_INCREMENT,
  `customized_id` int(11) NOT NULL,
  `fast_input_number` varchar(50) COLLATE utf8_bin NOT NULL DEFAULT '',
  `fast_input_state` tinyint(1) DEFAULT 0,
  `fast_input_data_ids` text COLLATE utf8_bin NOT NULL,
  `fast_input_content` text COLLATE utf8_bin DEFAULT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`fast_input_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for t_inventory_price_record
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_inventory_price_record` (
  `inventory_price_record_id` int(11) NOT NULL AUTO_INCREMENT,
  `inventory_id` int(11) NOT NULL,
  `record_time` datetime NOT NULL,
  `inventory_price` double(22,2) NOT NULL,
  `notes` text DEFAULT NULL,
  `status` int(2) DEFAULT 99,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`inventory_price_record_id`),
  KEY `inventory_id` (`inventory_id`),
  CONSTRAINT `t_inventory_price_record_ibfk_1` FOREIGN KEY (`inventory_id`) REFERENCES `t_inventory` (`inventory_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for t_machine_pause
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_machine_pause` (
  `machine_id` int(11) NOT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `permission` tinyint(1) DEFAULT 1,
  `pause_user_ids` text DEFAULT NULL,
  PRIMARY KEY (`machine_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Table structure for t_machine_stop_reason
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_machine_stop_reason` (
  `stop_reason_id` int(11) NOT NULL AUTO_INCREMENT,
  `stop_reason_name` varchar(255) NOT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `permission` tinyint(1) DEFAULT 1,
  `stop_reason_user_ids` text DEFAULT NULL,
  PRIMARY KEY (`stop_reason_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Table structure for t_offer_cost_float
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_offer_cost_float` (
  `offer_cost_float_id` int(11) NOT NULL AUTO_INCREMENT,
  `offer_cost_float_number` double(13,2) DEFAULT 0.00,
  `product_ids` text DEFAULT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`offer_cost_float_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Table structure for t_offer_price
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_offer_price` (
  `offer_price_id` int(11) NOT NULL AUTO_INCREMENT,
  `offer_price_des` varchar(255) NOT NULL,
  `offer_price_number` double(13,2) DEFAULT 0.00,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `permission` tinyint(1) DEFAULT 1,
  `see_user_ids` text DEFAULT NULL,
  PRIMARY KEY (`offer_price_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Table structure for t_user_report_password
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_user_report_password` (
  `user_id` int(11) NOT NULL,
  `report_password` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `report_password_type` tinyint(1) NOT NULL DEFAULT 0,
  `report_password_interval` int(11) DEFAULT 0,
  `use_time` datetime DEFAULT NULL,
  `ctime` datetime DEFAULT NULL,
  PRIMARY KEY (`user_id`) USING BTREE,
  CONSTRAINT `t_user_report_password_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

ALTER TABLE `t_machine_calculation`
ADD COLUMN IF NOT EXISTS `stop_reason_id`  int(11) NULL AFTER `public_note`;

ALTER TABLE `t_machine`
ADD COLUMN IF NOT EXISTS `pause_affair_data_id`  varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' AFTER `affair_data_id`;

ALTER TABLE `t_rule_new`
ADD COLUMN IF NOT EXISTS `machine_modular_pause`  tinyint(1) NULL DEFAULT 0 AFTER `machine_modular_wait`;


ALTER TABLE `t_rule_new`
ADD COLUMN IF NOT EXISTS `product_modular_internal_price`  tinyint(1) NULL DEFAULT 0 AFTER `documentary_modular_remove`,
ADD COLUMN IF NOT EXISTS `product_cost_accounting`  tinyint(1) NULL DEFAULT 0 AFTER `product_modular_internal_price`,
ADD COLUMN IF NOT EXISTS `product_cost_view`  tinyint(1) NULL DEFAULT 0 AFTER `product_cost_accounting`;


ALTER TABLE `t_inventory_calculation`
ADD COLUMN IF NOT EXISTS `offer_price`  decimal(22,3) NULL DEFAULT -1 AFTER `from_data_id`,
ADD COLUMN IF NOT EXISTS `offer_product_total_cost`  decimal(22,6) NULL AFTER `offer_price`,
ADD COLUMN IF NOT EXISTS `calculation_ctime`  datetime NULL DEFAULT NULL AFTER `offer_product_total_cost`;


ALTER TABLE `t_inventory`
ADD COLUMN IF NOT EXISTS `inventory_price_unit`  tinyint(1) NULL AFTER `utime`;

ALTER TABLE `t_process_in_calculation`
ADD COLUMN IF NOT EXISTS `user_id`  int(11) NOT NULL AFTER `tag_numbers`;

ALTER TABLE `t_process_out_calculation`
ADD COLUMN IF NOT EXISTS `user_id`  int(11) NOT NULL AFTER `tag_numbers`;

ALTER TABLE `t_statement_calculation`
ADD COLUMN IF NOT EXISTS `bill_ids` text NULL AFTER `tag_numbers`;

ALTER TABLE `t_tag_list_rel`
ADD COLUMN IF NOT EXISTS `ctime` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP AFTER `tag_id`;

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (238, 0, 9, 9, '胚布价格', 'public_embryo_price', '[{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (338, 0, 6, 10, '同步数量', 'synchronous_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);

ALTER TABLE `t_rule_new`
ADD COLUMN IF NOT EXISTS `image_search`  tinyint(1) NULL DEFAULT 0 AFTER `inventory_modular_edit`;

ALTER TABLE `t_product`
ADD COLUMN IF NOT EXISTS `search_id` int(11) NULL AFTER `product_public_notes`,
ADD COLUMN IF NOT EXISTS `search_status` int(11) NULL AFTER `search_id`;

ALTER TABLE `t_collection`
ADD COLUMN IF NOT EXISTS `search_id` int(11) NULL AFTER `recv_result`,
ADD COLUMN IF NOT EXISTS `search_status` int(11) NULL AFTER `search_id`;

ALTER TABLE `t_customer_group`
ADD COLUMN IF NOT EXISTS `permission`  tinyint(1) NULL DEFAULT 1 AFTER `deleteAt`,
ADD COLUMN IF NOT EXISTS `user_ids`  text CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `permission`;

ALTER TABLE `t_rule_new`
ADD COLUMN IF NOT EXISTS `product_confidential_set`  tinyint(1) NULL DEFAULT 0 AFTER `product_cost_view`,
ADD COLUMN IF NOT EXISTS `product_confidential_use`  tinyint(1) NULL DEFAULT 0 AFTER `product_confidential_set`;

ALTER TABLE `t_product`
ADD COLUMN IF NOT EXISTS  `product_cabinet_id`  int(11) NULL AFTER `search_status`;

ALTER TABLE `t_product` ADD FOREIGN KEY (`product_cabinet_id`) REFERENCES `t_confidential_cabinet` (`cabinet_id`) ON DELETE SET NULL ON UPDATE CASCADE;

-- ----------------------------
-- Table structure for t_confidential_cabinet
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_confidential_cabinet` (
  `cabinet_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '公司单号ID',
  `cabinet_name` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
  `permission` tinyint(1) DEFAULT 0,
  `user_ids` text COLLATE utf8_bin DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  PRIMARY KEY (`cabinet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for t_confidential_lock
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_confidential_lock` (
  `lock_id` int(11) NOT NULL AUTO_INCREMENT,
  `lock_name` varchar(20) COLLATE utf8_bin NOT NULL DEFAULT '',
  `lock_password` varchar(50) COLLATE utf8_bin NOT NULL DEFAULT '',
  `lock_time` varchar(25) COLLATE utf8_bin DEFAULT '',
  `user_id` int(11) DEFAULT NULL,
  `company_id` int(11) DEFAULT NULL,
  `ctime` datetime DEFAULT NULL,
  `utime` datetime DEFAULT NULL,
  PRIMARY KEY (`lock_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for t_confidential_relation
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_confidential_relation` (
  `relation_id` int(11) NOT NULL AUTO_INCREMENT,
  `lock_id` int(11) NOT NULL,
  `cabinet_id` int(11) NOT NULL,
  PRIMARY KEY (`relation_id`),
  KEY `lock_id` (`lock_id`),
  KEY `cabinet_id` (`cabinet_id`),
  CONSTRAINT `t_confidential_relation_ibfk_1` FOREIGN KEY (`lock_id`) REFERENCES `t_confidential_lock` (`lock_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `t_confidential_relation_ibfk_2` FOREIGN KEY (`cabinet_id`) REFERENCES `t_confidential_cabinet` (`cabinet_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for t_product_share_error
-- ----------------------------
CREATE TABLE IF NOT EXISTS `t_product_share_error` (
  `error_id` int(11) NOT NULL AUTO_INCREMENT,
  `error_ip` varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '',
  `error_number` tinyint(1) DEFAULT NULL,
  `error_time` datetime DEFAULT NULL,
  PRIMARY KEY (`error_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

ALTER TABLE `t_rule_new`
ADD COLUMN IF NOT EXISTS `customer_modular_group_secrecy`  tinyint(1) NULL DEFAULT 0 AFTER `product_confidential_use`;

REPLACE INTO `t_affair_system_column_group` (`group_id`, `group_name`) VALUES ('10', '成本');
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (332, 0, 8, 31, '暂停时间', 'suspended_time', '[]', '{\"key\":\"date_time\",\"value\":\"1\"}', 6, '', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (333, 0, 8, 31, '启动时间', 'activate_time', '[]', '{\"key\":\"date_time\",\"value\":\"1\"}', 6, '', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (334, 221, 6, 999910, '其他描述', 'warehouse_other_description', '[{\"key\":\"all\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"255\"}', 1, '{\"regex\":\"\",\"tips\":\"设置其他描述\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (17, 15, 2, 9999, '手机号码', 'sale_customer_phone', '[]', '{\"key\":\"integer\",\"value\":\"\"}', 0, '{\"regex\":\"/^1\\d{10}$/\",\"tips\":\"填入11位手机号码\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (235, 221, 6, 999912, '库存数量', 'warehouse_inventory_quantity', '[]', '{\"key\":\"string\",\"value\":\"255\"}', -1, '{\"regex\":\"\",\"tips\":\"\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (247, 0, 7, 2, '账户', 'account_category', '[{\"key\":\"oneself\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"50\"}', 35, '{\"regex\":\"\",\"tips\":\"请选择账户\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (331, 0, 5, 12, '停机事由', 'stop_reason_name', '[{\"key\":\"stop_reason_id\"}]', '{\"key\":\"stop_reason_id\",\"value\":\"stop_reason_name\"}', 39, '{\"regex\":\"\",\"tips\":\"选择暂停事由\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (4, 0, 1, 9, '出码率', 'product_weight', '[{\"key\":\"yard/kg\",\"value\":\"码/公斤\"},{\"key\":\"one/kg\",\"value\":\"条/公斤\"},{\"key\":\"m/kg\",\"value\":\"米/公斤\"},{\"key\":\"slice/kg\",\"value\":\"片/公斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (12, 0, 3, 1, '销售价格', 'sale_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (14, 0, 3, 3, '销售数量', 'sale_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (26, 0, 3, 8, '采购价格', 'purchase_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (28, 0, 3, 10, '采购数量', 'purchase_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (40, 0, 4, 2, '加工价格', 'machining_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (42, 0, 4, 4, '加工数量', 'machining_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (146, 0, 6, 2, '入库数量', 'in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (147, 0, 6, 5, '出库数量', 'out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (148, 0, 6, 6, '库存数量', 'inventory_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (157, 0, 3, 5, '退货价格', 'sale_refund_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (159, 0, 3, 4, '退货数量', 'sale_refund_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (163, 0, 9, 10, '数量', 'public_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (217, 0, 9, 5, '价格', 'public_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (231, 0, 6, 3, '要求入库数量', 'requirement_in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (232, 0, 6, 4, '实际入库数量', 'actual_in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (233, 0, 6, 7, '要求出库数量', 'requirement_out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (234, 0, 6, 8, '实际出库数量', 'actual_out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (237, 0, 9, 7, '成品价格', 'public_finished_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (238, 0, 9, 9, '胚布价格', 'public_embryo_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (258, 0, 4, 5, '要求进仓数量', 'requirement_in_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (259, 0, 4, 6, '实际进仓数量', 'actual_in_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (260, 0, 4, 7, '出仓数量', 'out_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (335, 0, 9, 15, '核对数量', 'check_amount', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 1, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (336, 0, 8, 32, '确认时间', 'confirm_time', '[]', '{\"key\":\"date_time\",\"value\":\"1\"}', 6, '', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (337, 0, 8, 33, '收到时间', 'received_time', '[]', '{\"key\":\"date_time\",\"value\":\"1\"}', 6, '', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (238, 0, 9, 9, '胚布价格', 'public_embryo_price', '[{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (338, 0, 6, 10, '同步数量', 'synchronous_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (4, 0, 1, 9, '出码率', 'product_weight', '[{\"key\":\"yard/kg\",\"value\":\"码/公斤\"},{\"key\":\"one/kg\",\"value\":\"条/公斤\"},{\"key\":\"m/kg\",\"value\":\"米/公斤\"},{\"key\":\"slice/kg\",\"value\":\"片/公斤\"},{\"key\":\"pcs/kg\",\"value\":\"粒/公斤\"},{\"key\":\"jin/kg\",\"value\":\"斤/公斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (12, 0, 3, 1, '销售价格', 'sale_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (14, 0, 3, 3, '销售数量', 'sale_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (26, 0, 3, 8, '采购价格', 'purchase_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (28, 0, 3, 10, '采购数量', 'purchase_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (40, 0, 4, 2, '加工价格', 'machining_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (42, 0, 4, 4, '加工数量', 'machining_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (146, 0, 6, 2, '入库数量', 'in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (147, 0, 6, 5, '出库数量', 'out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (148, 0, 6, 6, '库存数量', 'inventory_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (157, 0, 3, 5, '退货价格', 'sale_refund_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (159, 0, 3, 4, '退货数量', 'sale_refund_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (163, 0, 9, 10, '数量', 'public_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (217, 0, 9, 5, '价格', 'public_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (231, 0, 6, 3, '要求入库数量', 'requirement_in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (232, 0, 6, 4, '实际入库数量', 'actual_in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (233, 0, 6, 7, '要求出库数量', 'requirement_out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (234, 0, 6, 8, '实际出库数量', 'actual_out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (237, 0, 9, 7, '成品价格', 'public_finished_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (258, 0, 4, 5, '要求进仓数量', 'requirement_in_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (259, 0, 4, 6, '实际进仓数量', 'actual_in_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (260, 0, 4, 7, '出仓数量', 'out_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (335, 0, 9, 15, '核对数量', 'check_amount', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 1, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (338, 0, 6, 10, '同步数量', 'synchronous_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},\r\n{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);

ALTER TABLE `t_inventory_record`
ADD COLUMN IF NOT EXISTS `user_id`  int(11) NULL AFTER `utime`;

ALTER TABLE `t_documentary_step`
ADD COLUMN IF NOT EXISTS `tag_ids` text CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `utime`;

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (4, 0, 1, 9, '出码率', 'product_weight', '[{\"key\":\"yard/kg\",\"value\":\"码/公斤\"},{\"key\":\"one/kg\",\"value\":\"条/公斤\"},{\"key\":\"m/kg\",\"value\":\"米/公斤\"},{\"key\":\"slice/kg\",\"value\":\"片/公斤\"},{\"key\":\"pcs/kg\",\"value\":\"粒/公斤\"},{\"key\":\"jin/kg\",\"value\":\"斤/公斤\"},{\"key\":\"set/kg\",\"value\":\"套/公斤\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (12, 0, 3, 1, '销售价格', 'sale_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (14, 0, 3, 3, '销售数量', 'sale_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (26, 0, 3, 8, '采购价格', 'purchase_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (28, 0, 3, 10, '采购数量', 'purchase_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (40, 0, 4, 2, '加工价格', 'machining_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (42, 0, 4, 4, '加工数量', 'machining_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (146, 0, 6, 2, '入库数量', 'in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (147, 0, 6, 5, '出库数量', 'out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (148, 0, 6, 6, '库存数量', 'inventory_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (157, 0, 3, 5, '退货价格', 'sale_refund_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (159, 0, 3, 4, '退货数量', 'sale_refund_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (163, 0, 9, 10, '数量', 'public_quantity', '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, 'PriceQuantity', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (217, 0, 9, 5, '价格', 'public_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, 'PriceQuantity', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (231, 0, 6, 3, '要求入库数量', 'requirement_in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (232, 0, 6, 4, '实际入库数量', 'actual_in_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (233, 0, 6, 7, '要求出库数量', 'requirement_out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (234, 0, 6, 8, '实际出库数量', 'actual_out_warehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (237, 0, 9, 7, '成品价格', 'public_finished_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (238, 0, 9, 9, '胚布价格', 'public_embryo_price', '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"},{\"key\":\"yuan/slice\",\"value\":\"元/片\"},{\"key\":\"yuan/pcs\",\"value\":\"元/粒\"},{\"key\":\"yuan/jin\",\"value\":\"元/斤\"},{\"key\":\"yuan/set\",\"value\":\"元/套\"}]', '{\"key\":\"double\",\"value\":\"3\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', 0, '', 2, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (258, 0, 4, 5, '要求进仓数量', 'requirement_in_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (259, 0, 4, 6, '实际进仓数量', 'actual_in_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (260, 0, 4, 7, '出仓数量', 'out_storehouse_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 1, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (335, 0, 9, 15, '核对数量', 'check_amount', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 1, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);
REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (338, 0, 6, 10, '同步数量', 'synchronous_quantity', '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg/yard\",\"value\":\"公斤/码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"},{\"key\":\"slice\",\"value\":\"片\"},{\"key\":\"pcs\",\"value\":\"粒\"},{\"key\":\"jin\",\"value\":\"斤\"},{\"key\":\"set\",\"value\":\"套\"}]', '', 13, '{\"regex\":\"\",\"tips\":\"[公斤/码]时应如5.11/6.22\"}', 0, '', 1, NULL);


SET FOREIGN_KEY_CHECKS=1;