Browse Source

商品管理优化完了

张洋 1 month ago
parent
commit
c97464f760
26 changed files with 266 additions and 409 deletions
  1. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/err_bar_r6.png
  2. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_grey_h.png
  3. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_grey_n.png
  4. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_grey_p.png
  5. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_red_h.png
  6. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_red_n.png
  7. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_red_p.png
  8. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_check_off.png
  9. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_check_on.png
  10. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_combo_h.png
  11. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_combo_n.png
  12. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_combo_p.png
  13. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_input_h.png
  14. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_input_n.png
  15. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_input_p.png
  16. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_radio_off.png
  17. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_radio_on.png
  18. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_switch_off.png
  19. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_switch_on.png
  20. 27 156
      bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_create_wnd.xml
  21. 16 31
      bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_newtype_wnd.xml
  22. 28 162
      bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_update_wnd.xml
  23. BIN
      zhipuzi_pos_windows/resource/skin.zip
  24. 40 20
      zhipuzi_pos_windows/wnd/CShangpinCreateWnd.cpp
  25. 93 5
      zhipuzi_pos_windows/wnd/CShangpinNewTypeWnd.cpp
  26. 62 35
      zhipuzi_pos_windows/wnd/CShangpinUpdateWnd.cpp

BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/err_bar_r6.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_grey_h.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_grey_n.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_grey_p.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_red_h.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_red_n.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_btn_red_p.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_check_off.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_check_on.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_combo_h.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_combo_n.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_combo_p.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_input_h.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_input_n.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_input_p.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_radio_off.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_radio_on.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_switch_off.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/gd_switch_on.png


+ 27 - 156
bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_create_wnd.xml

@@ -1,160 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Window size="750,680" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
+<Window size="920,680" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
-		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF60B177">
-			<Label name="memo_dlg_title" text="新建商品" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="20"/>
-			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="#FF60B177">
+			<Label name="memo_dlg_title" text="新建商品" height="44" align="center" valign="center" textcolor="#FFFFFFFF" font="116"/>
+			<Button name="closebtn" float="true" pos="889,14,905,30" keyboard="false" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
-
-		<VerticalLayout visible="true" name="shangpin_create_dlg_content" height="636" vscrollbar="true">
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品名字:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_name_edit" width="400" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品序号:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_xuhao_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="(序号越小,排序越靠前)" width="300" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品分类:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Combo name="shangpin_create_dlg_foodtype" padding="15,9,0,0" width="300" height="32" tooltip="请点击这里选择商品分类" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="file='Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-				</Combo>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品条码:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_barcode_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="(没有可以不填,将随机生成一个)" width="300" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="销售价格:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_price_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="元" width="80" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="进货价:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_buyingprice_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="元" width="80" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="88" padding="0,25,0,0">
-				<Label text="进货价模式:" width="110" height="44" padding="20,0,0,0"></Label>
-				<VerticalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_jinhuojia_normal" group="shangpin_create_dlg_jinhuojia_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="按当前商品进货价 (一般用于临时加工销售的商品)" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_jinhuojia_jiaquan" group="shangpin_create_dlg_jinhuojia_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="按加权平均库存成本价 (一般用于采购入库销售的商品)" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品单位:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_unit_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="是否称重类型商品" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-				<CheckBox name="shangpin_create_dlg_chengzhong" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="条码秤PLU编码:" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_plu" width="400" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="88" padding="0,25,0,0">
-				<Label text="库存类型:" width="110" height="44" padding="20,0,0,0"></Label>
-				<VerticalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_kucun_open" group="shangpin_create_dlg_kucun_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="开启商品库存,下单自动扣减库存,库存不足无法下单" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_kucun_wuxian" group="shangpin_create_dlg_kucun_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="无限库存模式,下单不扣减库存" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="当前库存:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_kucun_now" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品状态:" width="110" height="44" padding="20,0,0,0"></Label>
-				<HorizontalLayout padding="30,0,30,0" width="90" height="44">
-					<CheckBox name="shangpin_create_dlg_status_normal" group="shangpin_create_dlg_status_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-					<Label text="正常 " width="300" padding="10,0,0,0"/>
-				</HorizontalLayout>
-				<HorizontalLayout padding="30,0,30,0" width="90" height="44">
-					<CheckBox name="shangpin_create_dlg_status_xiajia" group="shangpin_create_dlg_status_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-					<Label text="下架" width="300" padding="10,0,0,0"/>
-				</HorizontalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="在哪些地方显示:" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-
-				<CheckBox name="shangpin_create_dlg_showplace_shouyinji" selected="true" padding="15,14,0,14" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-				<Label text="收银机" width="100" padding="10,0,0,0"/>
-
-				<CheckBox name="shangpin_create_dlg_showplace_waimai" selected="true" padding="0,14,0,14" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-				<Label text="外卖" width="100" padding="10,0,0,0"/>
-
-				<CheckBox name="shangpin_create_dlg_showplace_saomadiancan" selected="true" padding="0,14,0,14" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-				<Label text="扫码点餐" width="100" padding="10,0,0,0"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="是否开启打包费" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-				<CheckBox name="shangpin_create_dlg_is_dabao" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="打包费金额:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_create_dlg_dabao_money" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="元" width="80" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="132" padding="0,25,0,0">
-				<Label text="商品加工方式:" width="110" height="44" padding="20,0,0,0"></Label>
-				<VerticalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_fangan_1" group="shangpin_create_dlg_fangan_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="方案一:门店直接采购成品,不需要加工" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_fangan_2" group="shangpin_create_dlg_fangan_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="方案二:门店采购原料,提前加工为成品" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_create_dlg_fangan_3" group="shangpin_create_dlg_fangan_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="方案三:门店采购原料,临时加工为成品" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="60" padding="0,10,0,0">
-				<Control></Control>
-				<Button name="shangpin_create_dlg_save_btn" width="400" height="60" text="保存" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'" />
-				<Control></Control>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="30" padding="0,10,0,0">
-				<Control></Control>
-				<Label name="shangpin_create_dlg_errinfo" font="20" width="600" height="30" wordbreak="true" text="" visible="false" textcolor="#FF0000" align="center" />
-				<Control></Control>
-			</HorizontalLayout>
+		<VerticalLayout visible="true" name="shangpin_create_dlg_content" vscrollbar="true" inset="22,10,0,6">
+			<Label text="基础信息" height="22" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="<c #E14B4A>*</c> 商品名字:" showhtml="true" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_name_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品分类:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Combo name="shangpin_create_dlg_foodtype" height="34" textcolor="#FF5F6368" font="13" tooltip="请点击这里选择商品分类" normalimage="file='gd_combo_n.png' corner='8,8,22,8'" hotimage="file='gd_combo_h.png' corner='8,8,22,8'" pushedimage="file='gd_combo_p.png' corner='8,8,22,8'" textpadding="11,0,30,0"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品序号:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_xuhao_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="越小越靠前" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品条码:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_barcode_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品单位:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_unit_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="是否称重类型商品" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><CheckBox name="shangpin_create_dlg_chengzhong" width="46" height="26" maxheight="26" normalimage="file='gd_switch_off.png'" hotimage="file='gd_switch_off.png'" selectedimage="file='gd_switch_on.png'"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="条码秤PLU编码:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_plu" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"></HorizontalLayout></HorizontalLayout>
+			<Label text="价格与成本" height="32" textpadding="0,10,0,0" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="<c #E14B4A>*</c> 销售价格:" showhtml="true" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_price_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="元" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="进货价:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_buyingprice_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="元" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="10" padding="0,0,22,0"><Label text="进货价模式:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_create_dlg_jinhuojia_normal" group="shangpin_create_dlg_jinhuojia_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="按当前商品进货价" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_create_dlg_jinhuojia_jiaquan" group="shangpin_create_dlg_jinhuojia_type" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="按加权平均库存成本价" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="是否开启打包费" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><CheckBox name="shangpin_create_dlg_is_dabao" width="46" height="26" maxheight="26" normalimage="file='gd_switch_off.png'" hotimage="file='gd_switch_off.png'" selectedimage="file='gd_switch_on.png'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="打包费金额:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_dabao_money" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="元" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout></HorizontalLayout>
+			<Label text="库存与状态" height="32" textpadding="0,10,0,0" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="10" padding="0,0,22,0"><Label text="库存类型:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_create_dlg_kucun_open" group="shangpin_create_dlg_kucun_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="开启库存,下单自动扣减" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_create_dlg_kucun_wuxian" group="shangpin_create_dlg_kucun_type" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="无限库存,不扣减" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="当前库存:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_create_dlg_kucun_now" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品状态:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_create_dlg_status_normal" group="shangpin_create_dlg_status_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="正常" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_create_dlg_status_xiajia" group="shangpin_create_dlg_status_type" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="下架" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout></HorizontalLayout>
+			<Label text="展示设置" height="32" textpadding="0,10,0,0" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="10" padding="0,0,22,0"><Label text="在哪些地方显示:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_create_dlg_showplace_shouyinji" selected="true" width="15" height="15" maxheight="15" normalimage="file='gd_check_off.png'" hotimage="file='gd_check_off.png'" selectedimage="file='gd_check_on.png'"/><Label text="收银机" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_create_dlg_showplace_waimai" selected="true" width="15" height="15" maxheight="15" normalimage="file='gd_check_off.png'" hotimage="file='gd_check_off.png'" selectedimage="file='gd_check_on.png'"/><Label text="外卖" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_create_dlg_showplace_saomadiancan" selected="true" width="15" height="15" maxheight="15" normalimage="file='gd_check_off.png'" hotimage="file='gd_check_off.png'" selectedimage="file='gd_check_on.png'"/><Label text="扫码点餐" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout>
 		</VerticalLayout>
-    </VerticalLayout>
-</Window>
+		<Control height="10"/>
+		<HorizontalLayout height="68" inset="22,12,22,16" childpadding="12">
+			<Button name="shangpin_create_dlg_cancel_btn" width="432" height="40" text="取消" textcolor="#FF5F6368" font="14" normalimage="file='gd_btn_grey_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_grey_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_grey_p.png' corner='8,8,8,8'"/>
+			<Button name="shangpin_create_dlg_save_btn" width="432" height="40" text="保存商品" textcolor="#FFFFFFFF" font="114" normalimage="file='gd_btn_green_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_green_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_green_p.png' corner='8,8,8,8'"/>
+		</HorizontalLayout>
+		<Label name="shangpin_create_dlg_errinfo" float="true" pos="22,596,898,624" text="" visible="false"       bkimage="file='err_bar_r6.png' corner='6,6,6,6'"       textpadding="12,0,12,0" textcolor="#FFC7403F" font="13" align="center"/>
+	</VerticalLayout>
+</Window>

+ 16 - 31
bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_newtype_wnd.xml

@@ -1,34 +1,19 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window size="620,544" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
+<?xml version="1.0" encoding="UTF-8"?>
+<Window size="520,220" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
-		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF60B177">
-			<Label name="memo_dlg_title" text="新建商品分类" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="20"/>
-			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="#FF60B177">
+			<Label name="memo_dlg_title" text="新建商品分类" height="44" align="center" valign="center" textcolor="#FFFFFFFF" font="116"/>
+			<Button name="closebtn" float="true" pos="489,14,505,30" keyboard="false" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
-		
-		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">		
-			<HorizontalLayout height="44" padding="0,30,0,0">
-				<Label text="分类名字:" width="80" height="44" padding="20,0,0,0"></Label>					
-				<Edit name="fenlei_create_page_name_edit" width="400" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-			
-			<HorizontalLayout height="44" padding="0,30,0,0">
-				<Label text="分类序号:" width="80" height="44" padding="20,0,0,0"></Label>					
-				<Edit name="fenlei_create_page_xuhao_edit" width="100" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="(序号越小,排序越靠前)" width="300" height="44" padding="20,0,0,0"></Label>		
-			</HorizontalLayout>
-			
-			<HorizontalLayout height="60" padding="0,80,0,50">
-				<Control></Control>
-				<Button name="fenlei_create_page_save_btn" width="400" height="60" text="保存" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'" />
-				<Control></Control>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="50" padding="0,30,0,0">
-				<Control></Control>
-				<Label name="errinfo" font="20" width="400" height="50" wordbreak="true" text="" visible="false" textcolor="#FF0000" align="center" />
-				<Control></Control>
-			</HorizontalLayout>			
+		<VerticalLayout visible="true" name="shangpin_newtype_dlg_content" inset="22,12,22,8">
+			<HorizontalLayout height="40" childpadding="10" childvalign="vcenter"><Label text="<c #E14B4A>*</c> 分类名字:" showhtml="true" width="88" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="fenlei_create_page_name_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="10" childvalign="vcenter"><Label text="分类序号:" width="88" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="fenlei_create_page_xuhao_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="越小越靠前" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout>
 		</VerticalLayout>
-    </VerticalLayout>
-</Window>
+		<Control height="8"/>
+		<HorizontalLayout height="68" inset="22,12,22,16" childpadding="12">
+			<Button name="fenlei_create_page_cancel_btn" width="232" height="40" text="取消" textcolor="#FF5F6368" font="14" normalimage="file='gd_btn_grey_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_grey_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_grey_p.png' corner='8,8,8,8'"/>
+			<Button name="fenlei_create_page_save_btn" width="232" height="40" text="保存" textcolor="#FFFFFFFF" font="114" normalimage="file='gd_btn_green_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_green_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_green_p.png' corner='8,8,8,8'"/>
+		</HorizontalLayout>
+		<Label name="errinfo" float="true" pos="22,136,498,164" font="12" text="" visible="false" bkimage="file='err_bar_r6.png' corner='6,6,6,6'" textpadding="12,0,12,0" textcolor="#FFC7403F" align="center"/>
+	</VerticalLayout>
+</Window>

+ 28 - 162
bin/Win32/Debug/zhipuzi_pos_windows/skin/shangpin_update_wnd.xml

@@ -1,166 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Window size="750,680" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
+<Window size="920,680" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
-		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF60B177">
-			<Label name="memo_dlg_title" text="修改商品" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="20"/>
-			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="#FF60B177">
+			<Label name="memo_dlg_title" text="修改商品" height="44" align="center" valign="center" textcolor="#FFFFFFFF" font="116"/>
+			<Button name="closebtn" float="true" pos="889,14,905,30" keyboard="false" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
-
-		<VerticalLayout visible="true" name="shangpin_update_dlg_content" height="636" vscrollbar="true">
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品名字:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_name_edit" width="400" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品序号:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_xuhao_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="(序号越小,排序越靠前)" width="300" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品分类:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Combo name="shangpin_update_dlg_foodtype" padding="15,9,0,0" width="300" height="32" tooltip="请点击这里选择商品分类" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="file='Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
-				</Combo>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品条码:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_barcode_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="(没有可以不填,将随机生成一个)" width="300" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="销售价格:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_price_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="元" width="80" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="进货价:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_buyingprice_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="元" width="80" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="88" padding="0,25,0,0">
-				<Label text="进货价模式:" width="110" height="44" padding="20,0,0,0"></Label>
-				<VerticalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_jinhuojia_normal" group="shangpin_update_dlg_jinhuojia_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="按当前商品进货价 (一般用于临时加工销售的商品)" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_jinhuojia_jiaquan" group="shangpin_update_dlg_jinhuojia_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="按加权平均库存成本价 (一般用于采购入库销售的商品)" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品单位:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_unit_edit" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="是否称重类型商品" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-				<CheckBox name="shangpin_update_dlg_chengzhong" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="条码秤PLU编码:" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_plu" width="400" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="88" padding="0,25,0,0">
-				<Label text="库存类型:" width="110" height="44" padding="20,0,0,0"></Label>
-				<VerticalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_kucun_open" group="shangpin_update_dlg_kucun_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="开启商品库存,下单自动扣减库存,库存不足无法下单" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_kucun_wuxian" group="shangpin_update_dlg_kucun_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="无限库存模式,下单不扣减库存" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="当前库存:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_kucun_now" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="商品状态:" width="110" height="44" padding="20,0,0,0"></Label>
-				<HorizontalLayout padding="30,0,30,0" width="90" height="44">
-					<CheckBox name="shangpin_update_dlg_status_normal" group="shangpin_update_dlg_status_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-					<Label text="正常 " width="300" padding="10,0,0,0"/>
-				</HorizontalLayout>
-				<HorizontalLayout padding="30,0,30,0" width="90" height="44">
-					<CheckBox name="shangpin_update_dlg_status_xiajia" group="shangpin_update_dlg_status_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-					<Label text="下架" width="300" padding="10,0,0,0"/>
-				</HorizontalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="在哪些地方显示:" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-
-				<CheckBox name="shangpin_update_dlg_showplace_shouyinji" selected="true" padding="15,14,0,14" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-				<Label text="收银机" width="100" padding="10,0,0,0"/>
-
-				<CheckBox name="shangpin_update_dlg_showplace_waimai" selected="true" padding="0,14,0,14" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-				<Label text="外卖" width="100" padding="10,0,0,0"/>
-
-				<CheckBox name="shangpin_update_dlg_showplace_saomadiancan" selected="true" padding="0,14,0,14" width="16" height="16" normalimage="file='Setting_CheckBox_Normal.png'" hotimage="file='Setting_CheckBox_Hover.png'" selectedimage="file='Setting_CheckBox_Click.png'"/>
-				<Label text="扫码点餐" width="100" padding="10,0,0,0"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="是否开启打包费" wordbreak="true" width="110" height="44" padding="20,0,0,0"></Label>
-				<CheckBox name="shangpin_update_dlg_is_dabao" width="72" height="45" normalimage="file='switchbutton.png' source='0,0,143,91'" selectedimage="file='switchbutton.png' source='0,182,143,273'"/>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="44" padding="0,25,0,0">
-				<Label text="打包费金额:" width="110" height="44" padding="20,0,0,0"></Label>
-				<Edit name="shangpin_update_dlg_dabao_money" width="200" height="44" padding="15,0,0,0" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
-				<Label text="元" width="80" height="44" padding="20,0,0,0"></Label>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="132" padding="0,25,0,0">
-				<Label text="商品加工方式:" width="110" height="44" padding="20,0,0,0"></Label>
-				<VerticalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_fangan_1" group="shangpin_update_dlg_fangan_type" selected="true" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="方案一:门店直接采购成品,不需要加工" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_fangan_2" group="shangpin_update_dlg_fangan_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="方案二:门店采购原料,提前加工为成品" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-					<HorizontalLayout padding="30,0,30,0" width="560" height="44">
-						<CheckBox name="shangpin_update_dlg_fangan_3" group="shangpin_update_dlg_fangan_type" padding="0,15,0,15" width="13" height="13" normalimage="file='RadioBtnNon.png'" hotimage="file='RadioBtnNon.png'" selectedimage="file='RadioBtnSel.png'"/>
-						<Label text="方案三:门店采购原料,临时加工为成品" width="520" padding="10,0,0,0"/>
-					</HorizontalLayout>
-				</VerticalLayout>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="60" padding="0,30,0,0">
-				<Control></Control>
-				<Button name="shangpin_update_dlg_save_btn" width="400" height="60" text="保存" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'" />
-				<Control></Control>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="60" padding="0,20,0,0">
-				<Control></Control>
-				<Button name="shangpin_update_dlg_delete_btn" width="400" height="60" text="删除商品" textcolor="#FFFFFFFF" normalimage="file='btn_red_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_red_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_red_dianji.png' corner='5,5,5,5'" />
-				<Control></Control>
-			</HorizontalLayout>
-
-			<HorizontalLayout height="30" padding="0,10,0,20">
-				<Control></Control>
-				<Label name="shangpin_update_dlg_errinfo" font="20" width="600" height="30" wordbreak="true" text="" visible="false" textcolor="#FF0000" align="center" />
-				<Control></Control>
-			</HorizontalLayout>
+		<VerticalLayout visible="true" name="shangpin_update_dlg_content" vscrollbar="true" inset="22,10,0,6">
+			<Label text="基础信息" height="22" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="<c #E14B4A>*</c> 商品名字:" showhtml="true" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_name_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品分类:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Combo name="shangpin_update_dlg_foodtype" height="34" textcolor="#FF5F6368" font="13" tooltip="请点击这里选择商品分类" normalimage="file='gd_combo_n.png' corner='8,8,22,8'" hotimage="file='gd_combo_h.png' corner='8,8,22,8'" pushedimage="file='gd_combo_p.png' corner='8,8,22,8'" textpadding="11,0,30,0"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品序号:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_xuhao_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="越小越靠前" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品条码:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_barcode_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品单位:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_unit_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="是否称重类型商品" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><CheckBox name="shangpin_update_dlg_chengzhong" width="46" height="26" maxheight="26" normalimage="file='gd_switch_off.png'" hotimage="file='gd_switch_off.png'" selectedimage="file='gd_switch_on.png'"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="条码秤PLU编码:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_plu" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"></HorizontalLayout></HorizontalLayout>
+			<Label text="价格与成本" height="32" textpadding="0,10,0,0" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="<c #E14B4A>*</c> 销售价格:" showhtml="true" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_price_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="元" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="进货价:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_buyingprice_edit" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="元" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="10" padding="0,0,22,0"><Label text="进货价模式:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_update_dlg_jinhuojia_normal" group="shangpin_update_dlg_jinhuojia_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="按当前商品进货价" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_update_dlg_jinhuojia_jiaquan" group="shangpin_update_dlg_jinhuojia_type" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="按加权平均库存成本价" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="是否开启打包费" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><CheckBox name="shangpin_update_dlg_is_dabao" width="46" height="26" maxheight="26" normalimage="file='gd_switch_off.png'" hotimage="file='gd_switch_off.png'" selectedimage="file='gd_switch_on.png'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="打包费金额:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_dabao_money" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/><Label text="元" height="34" autocalcwidth="true" textcolor="#FF8A9099" font="12" valign="center" padding="8,0,0,0"/></HorizontalLayout></HorizontalLayout>
+			<Label text="库存与状态" height="32" textpadding="0,10,0,0" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="10" padding="0,0,22,0"><Label text="库存类型:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_update_dlg_kucun_open" group="shangpin_update_dlg_kucun_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="开启库存,下单自动扣减" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_update_dlg_kucun_wuxian" group="shangpin_update_dlg_kucun_type" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="无限库存,不扣减" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout>
+			<HorizontalLayout height="40" childpadding="24" padding="0,0,22,0"><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="当前库存:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><Edit name="shangpin_update_dlg_kucun_now" height="34" textcolor="#FF1F2329" font="13" textpadding="11,0,11,0" normalimage="file='gd_input_n.png' corner='8,8,8,8'" hotimage="file='gd_input_h.png' corner='8,8,8,8'" pushedimage="file='gd_input_p.png' corner='8,8,8,8'"/></HorizontalLayout><HorizontalLayout childpadding="10" childvalign="vcenter"><Label text="商品状态:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_update_dlg_status_normal" group="shangpin_update_dlg_status_type" selected="true" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="正常" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_update_dlg_status_xiajia" group="shangpin_update_dlg_status_type" width="14" height="14" maxheight="14" normalimage="file='gd_radio_off.png'" hotimage="file='gd_radio_off.png'" selectedimage="file='gd_radio_on.png'"/><Label text="下架" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout></HorizontalLayout>
+			<Label text="展示设置" height="32" textpadding="0,10,0,0" font="113" textcolor="#FF5F6368" valign="top" padding="0,0,22,0"/><HorizontalLayout height="1" bkcolor="#FFF0F1F3" padding="0,0,22,0"><Control/></HorizontalLayout><Control height="5" padding="0,0,22,0"/>
+			<HorizontalLayout height="40" childpadding="10" padding="0,0,22,0"><Label text="在哪些地方显示:" width="124" height="34" textcolor="#FF5F6368" font="13" align="left" valign="center"/><HorizontalLayout childpadding="7" childvalign="vcenter"><CheckBox name="shangpin_update_dlg_showplace_shouyinji" selected="true" width="15" height="15" maxheight="15" normalimage="file='gd_check_off.png'" hotimage="file='gd_check_off.png'" selectedimage="file='gd_check_on.png'"/><Label text="收银机" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_update_dlg_showplace_waimai" selected="true" width="15" height="15" maxheight="15" normalimage="file='gd_check_off.png'" hotimage="file='gd_check_off.png'" selectedimage="file='gd_check_on.png'"/><Label text="外卖" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/><CheckBox padding="9,0,0,0" name="shangpin_update_dlg_showplace_saomadiancan" selected="true" width="15" height="15" maxheight="15" normalimage="file='gd_check_off.png'" hotimage="file='gd_check_off.png'" selectedimage="file='gd_check_on.png'"/><Label text="扫码点餐" height="34" autocalcwidth="true" textcolor="#FF5F6368" font="13" valign="center"/></HorizontalLayout></HorizontalLayout>
 		</VerticalLayout>
-    </VerticalLayout>
-</Window>
+		<Control height="10"/>
+		<HorizontalLayout height="68" inset="22,12,22,16" childpadding="12">
+			<Button name="shangpin_update_dlg_delete_btn" width="284" height="40" text="删除商品" textcolor="#FFFFFFFF" font="114" normalimage="file='gd_btn_red_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_red_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_red_p.png' corner='8,8,8,8'"/>
+			<Button name="shangpin_update_dlg_cancel_btn" width="284" height="40" text="取消" textcolor="#FF5F6368" font="14" normalimage="file='gd_btn_grey_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_grey_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_grey_p.png' corner='8,8,8,8'"/>
+			<Button name="shangpin_update_dlg_save_btn" width="284" height="40" text="保存商品" textcolor="#FFFFFFFF" font="114" normalimage="file='gd_btn_green_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_green_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_green_p.png' corner='8,8,8,8'"/>
+		</HorizontalLayout>
+		<Label name="shangpin_update_dlg_errinfo" float="true" pos="22,596,898,624" text="" visible="false"       bkimage="file='err_bar_r6.png' corner='6,6,6,6'"       textpadding="12,0,12,0" textcolor="#FFC7403F" font="13" align="center"/>
+	</VerticalLayout>
+</Window>

BIN
zhipuzi_pos_windows/resource/skin.zip


+ 40 - 20
zhipuzi_pos_windows/wnd/CShangpinCreateWnd.cpp

@@ -171,6 +171,11 @@ void CShangpinCreateWnd::Notify(TNotifyUI& msg)
 		{
 			StartSave();
 		}
+		else if (senderName == L"shangpin_create_dlg_cancel_btn")
+		{
+			Close(IDCANCEL);
+			return;
+		}
 	}
 	else if (msg.sType == _T("textchanged"))
 	{
@@ -347,9 +352,8 @@ void CShangpinCreateWnd::InitFoodtypeListAndFoodinfo()
 	CEditUI* pDaobaofei = static_cast<CEditUI*>(m_pm.FindControl(L"shangpin_create_dlg_dabao_money"));
 	pDaobaofei->SetText(L"0");
 
-	//商品加工方式
-	CCheckBoxUI* pJiagongfangshi = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_create_dlg_fangan_1"));
-	pJiagongfangshi->Selected(true, false);
+	//商品加工方式已从弹框删除,保存时统一按「方案一」写死
+	m_jiagong_type = 1;
 
 	ShowError(L"");
 
@@ -551,23 +555,8 @@ void CShangpinCreateWnd::StartSave()
 		m_dabaofei = "0";
 	}
 
-	//商品加工方式
-	CCheckBoxUI* pJiagongfangshi_1 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_create_dlg_fangan_1"));
-	CCheckBoxUI* pJiagongfangshi_2 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_create_dlg_fangan_2"));
-	CCheckBoxUI* pJiagongfangshi_3 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_create_dlg_fangan_3"));
-
-	if (pJiagongfangshi_1->IsSelected())
-	{
-		m_jiagong_type = 1;
-	}
-	else if (pJiagongfangshi_2->IsSelected())
-	{
-		m_jiagong_type = 2;
-	}
-	else if (pJiagongfangshi_3->IsSelected())
-	{
-		m_jiagong_type = 3;
-	}
+	//商品加工方式已从弹框删除,统一按「方案一」保存
+	m_jiagong_type = 1;
 
 	m_status = 1;
 
@@ -699,17 +688,48 @@ void CShangpinCreateWnd::HandleSave()
 	}
 
 	rapidjson::Value& v_errcode = document["errcode"];
+	if (!v_errcode.IsInt())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	int errcode = v_errcode.GetInt();
 	if (errcode != 0)
 	{
+		//⭐ errmsg 必须先判类型再取:缺失或非字符串时 GetString() 会断言失败(Debug 下直接崩)
+		if (!document["errmsg"].IsString())
+		{
+			m_errorInfo = L"服务器错误";
+			PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+			return;
+		}
+
 		std::string v_errmsg = document["errmsg"].GetString();
 		m_errorInfo = CLewaimaiString::UTF8ToUnicode(v_errmsg);
 		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
 		return;
 	}
 
+	//⭐ 必须 HasMember + IsObject 后再取:服务端异常时可能不返回 data,
+	//   直接 document["data"] 会触发 rapidjson 断言(= "点按钮就崩" 的根因)
+	if (!document.HasMember("data") || !document["data"].IsObject())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	rapidjson::Value& data = document["data"];
 
+	if (!data.HasMember("id") || !data["id"].IsString())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	std::string id = data["id"].GetString();
 
 	//走到这里说明商品保存成功了,接着把商品的数据更新到数据库

+ 93 - 5
zhipuzi_pos_windows/wnd/CShangpinNewTypeWnd.cpp

@@ -171,6 +171,11 @@ void CShangpinNewTypeWnd::Notify(TNotifyUI& msg)
 			Close(IDCANCEL);
 			return;
 		}
+		else if (senderName == L"fenlei_create_page_cancel_btn")
+		{
+			Close(IDCANCEL);
+			return;
+		}
 		else if (senderName == L"fenlei_create_page_save_btn")
 		{
 			StartSave();
@@ -221,8 +226,49 @@ void CShangpinNewTypeWnd::SetTitle(std::wstring title)
 	pLabel->SetText(title.c_str());
 }
 
+//去掉首尾空白(半角空格/制表/换行 + 全角空格 0x3000)
+static std::wstring NewType_Trim(const std::wstring& s)
+{
+	if (s.empty())
+	{
+		return s;
+	}
+
+	const std::wstring kBlank = std::wstring(L" \t\r\n") + wchar_t(0x3000);
+
+	size_t nBegin = s.find_first_not_of(kBlank);
+	if (nBegin == std::wstring::npos)
+	{
+		return L"";
+	}
+
+	size_t nEnd = s.find_last_not_of(kBlank);
+	return s.substr(nBegin, nEnd - nBegin + 1);
+}
+
 void CShangpinNewTypeWnd::StartSave()
 {
+	//⭐ 前端校验:分类名字为空(含纯空格)时直接提示,不发请求、不起线程
+	//   —— 否则会带着空名字请求服务器,服务端返回体缺字段时 rapidjson 的
+	//      operator[] 在 Debug 下会断言失败(表现就是用户看到的"点保存就异常")
+	CEditUI* pNameEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fenlei_create_page_name_edit")));
+	if (pNameEdit == NULL)
+	{
+		return;
+	}
+
+	std::wstring ws_name = NewType_Trim(std::wstring(pNameEdit->GetText()));
+	if (ws_name.empty())
+	{
+		m_errorInfo = _T("请输入分类名字");
+		PostMessage(WM_MEMBER_CHECK_FAIL);
+
+		return;
+	}
+
+	//把去掉首尾空格后的名字回填,避免存进库里是带空格的
+	pNameEdit->SetText(ws_name.c_str());
+
 	m_status = 1;
 
 	//开始处理
@@ -232,11 +278,21 @@ void CShangpinNewTypeWnd::StartSave()
 void CShangpinNewTypeWnd::HandleSave()
 {
 	CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fenlei_create_page_name_edit")));
-	std::wstring ws_foodtype_name = pFukuanEdit->GetText();
-	std::string foodtype_name = CLewaimaiString::UnicodeToUTF8(ws_foodtype_name);
+	if (pFukuanEdit == NULL)
+	{
+		return;
+	}
 
 	CEditUI* pXuhaoEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fenlei_create_page_xuhao_edit")));
-	std::wstring ws_xuhao = pXuhaoEdit->GetText();
+	if (pXuhaoEdit == NULL)
+	{
+		return;
+	}
+
+	std::wstring ws_foodtype_name = NewType_Trim(std::wstring(pFukuanEdit->GetText()));
+	std::string foodtype_name = CLewaimaiString::UnicodeToUTF8(ws_foodtype_name);
+
+	std::wstring ws_xuhao = NewType_Trim(std::wstring(pXuhaoEdit->GetText()));
 	std::string xuhao = CLewaimaiString::UnicodeToUTF8(ws_xuhao);
 	if (xuhao == "")
 	{
@@ -279,11 +335,35 @@ void CShangpinNewTypeWnd::HandleSave()
 		}
 
 		rapidjson::Value& v_errcode = document["errcode"];
+		if (!v_errcode.IsInt())
+		{
+			m_errorInfo = _T("服务器返回数据格式错误");
+			PostMessage(WM_MEMBER_CHECK_FAIL);
+
+			return;
+		}
+
 		int errcode = v_errcode.GetInt();
 		if (errcode != 0)
 		{
-			std::string errmsg = CLewaimaiString::UnicodeToUTF8(L"权益卡扫码失败:") + std::string(document["errmsg"].GetString());
-			m_errorInfo = CLewaimaiString::UTF8ToUnicode(errmsg);
+			//⭐ errmsg 必须先判类型再取,缺失或非字符串时 GetString() 会断言失败
+			std::wstring ws_errmsg = L"创建分类失败:";
+			if (document["errmsg"].IsString())
+			{
+				ws_errmsg += CLewaimaiString::UTF8ToUnicode(std::string(document["errmsg"].GetString()));
+			}
+
+			m_errorInfo = ws_errmsg;
+			PostMessage(WM_MEMBER_CHECK_FAIL);
+
+			return;
+		}
+
+		//⭐ 必须 HasMember + IsObject 后再取:空名字等异常输入时服务端可能不返回 data,
+		//   直接 document["data"] 会触发 rapidjson 断言(= "点保存就崩" 的根因之一)
+		if (!document.HasMember("data") || !document["data"].IsObject())
+		{
+			m_errorInfo = _T("服务器返回数据格式错误");
 			PostMessage(WM_MEMBER_CHECK_FAIL);
 
 			return;
@@ -291,6 +371,14 @@ void CShangpinNewTypeWnd::HandleSave()
 
 		rapidjson::Value& data = document["data"];
 
+		if (!data.HasMember("type_id") || !data["type_id"].IsString())
+		{
+			m_errorInfo = _T("服务器返回数据格式错误");
+			PostMessage(WM_MEMBER_CHECK_FAIL);
+
+			return;
+		}
+
 		//分类创建成功,开始进行后续处理
 		std::string type_id = data["type_id"].GetString();
 

+ 62 - 35
zhipuzi_pos_windows/wnd/CShangpinUpdateWnd.cpp

@@ -170,6 +170,15 @@ void CShangpinUpdateWnd::Notify(TNotifyUI& msg)
 
 			return;
 		}
+		else if (senderName == L"shangpin_update_dlg_cancel_btn")
+		{
+			if (m_status != 1)
+			{
+				Close(IDCANCEL);
+			}
+
+			return;
+		}
 		else if (senderName == L"shangpin_update_dlg_save_btn")
 		{
 			StartSave();
@@ -356,27 +365,9 @@ void CShangpinUpdateWnd::FillFoodinfo()
 	CEditUI* pDaobaofei = static_cast<CEditUI*>(m_pm.FindControl(L"shangpin_update_dlg_dabao_money"));
 	pDaobaofei->SetText(CLewaimaiString::UTF8ToUnicode(m_foodinfo.dabao_money).c_str());
 
-	//商品加工方式
-	CCheckBoxUI* pJiagongfangshi_1 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_update_dlg_fangan_1"));
-	CCheckBoxUI* pJiagongfangshi_2 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_update_dlg_fangan_2"));
-	CCheckBoxUI* pJiagongfangshi_3 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_update_dlg_fangan_3"));
-
-	if (m_foodinfo.jiagong_type == "1")
-	{
-		pJiagongfangshi_1->Selected(true, false);
-	}
-	else if (m_foodinfo.jiagong_type == "2")
-	{
-		pJiagongfangshi_2->Selected(true, false);
-	}
-	else if (m_foodinfo.jiagong_type == "3")
-	{
-		pJiagongfangshi_3->Selected(true, false);
-	}
-	else
-	{
-		pJiagongfangshi_1->Selected(true, false);
-	}
+	//商品加工方式已从弹框删除(与新建商品弹框保持一致),这里只给默认值;
+	//真正保存时以商品原有的加工方式为准(见 StartSave)
+	m_jiagong_type = 1;
 
 	ShowError(L"");
 
@@ -578,23 +569,13 @@ void CShangpinUpdateWnd::StartSave()
 		m_dabaofei = "0";
 	}
 
-	//商品加工方式
-	CCheckBoxUI* pJiagongfangshi_1 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_update_dlg_fangan_1"));
-	CCheckBoxUI* pJiagongfangshi_2 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_update_dlg_fangan_2"));
-	CCheckBoxUI* pJiagongfangshi_3 = static_cast<CCheckBoxUI*>(m_pm.FindControl(L"shangpin_update_dlg_fangan_3"));
-
-	if (pJiagongfangshi_1->IsSelected())
+	//商品加工方式已从弹框删除(UI 上不可改),保存时沿用商品原本的加工方式
+	//老数据里 jiagong_type 可能为空,空值或非法值兜底为「方案一」
+	m_jiagong_type = atoi(m_foodinfo.jiagong_type.c_str());
+	if (m_jiagong_type < 1 || m_jiagong_type > 3)
 	{
 		m_jiagong_type = 1;
 	}
-	else if (pJiagongfangshi_2->IsSelected())
-	{
-		m_jiagong_type = 2;
-	}
-	else if (pJiagongfangshi_3->IsSelected())
-	{
-		m_jiagong_type = 3;
-	}
 
 	m_status = 1;
 
@@ -730,17 +711,48 @@ void CShangpinUpdateWnd::HandleSave()
 	}
 
 	rapidjson::Value& v_errcode = document["errcode"];
+	if (!v_errcode.IsInt())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	int errcode = v_errcode.GetInt();
 	if (errcode != 0)
 	{
+		//⭐ errmsg 必须先判类型再取:缺失或非字符串时 GetString() 会断言失败(Debug 下直接崩)
+		if (!document["errmsg"].IsString())
+		{
+			m_errorInfo = L"服务器错误";
+			PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+			return;
+		}
+
 		std::string v_errmsg = document["errmsg"].GetString();
 		m_errorInfo = CLewaimaiString::UTF8ToUnicode(v_errmsg);
 		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
 		return;
 	}
 
+	//⭐ 必须 HasMember + IsObject 后再取:服务端异常时可能不返回 data,
+	//   直接 document["data"] 会触发 rapidjson 断言(= "点按钮就崩" 的根因)
+	if (!document.HasMember("data") || !document["data"].IsObject())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	rapidjson::Value& data = document["data"];
 
+	if (!data.HasMember("goods_id") || !data["goods_id"].IsString())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	std::string id = data["goods_id"].GetString();
 
 	//走到这里说明商品保存成功了,接着把商品的数据更新到数据库
@@ -798,9 +810,24 @@ void CShangpinUpdateWnd::HandleDelete()
 	}
 
 	rapidjson::Value& v_errcode = document["errcode"];
+	if (!v_errcode.IsInt())
+	{
+		m_errorInfo = L"服务器错误";
+		PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+		return;
+	}
+
 	int errcode = v_errcode.GetInt();
 	if (errcode != 0)
 	{
+		//⭐ errmsg 必须先判类型再取:缺失或非字符串时 GetString() 会断言失败(Debug 下直接崩)
+		if (!document["errmsg"].IsString())
+		{
+			m_errorInfo = L"服务器错误";
+			PostMessage(WM_SHANGPIN_HANDLE_FAIL);
+			return;
+		}
+
 		std::string v_errmsg = document["errmsg"].GetString();
 		m_errorInfo = CLewaimaiString::UTF8ToUnicode(v_errmsg);
 		PostMessage(WM_SHANGPIN_HANDLE_FAIL);