ht-trade-settlement-add.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>航通交易结算表-添加/修改</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css js 资源 -->
  8. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. <style type="text/css">
  17. .c-panel .el-form .c-label{width: 7em !important;}
  18. .c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
  19. </style>
  20. </head>
  21. <body>
  22. <div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
  23. <!-- ------- 内容部分 ------- -->
  24. <div class="s-body">
  25. <div class="c-panel">
  26. <div class="c-title" v-if="id == 0">数据添加</div>
  27. <div class="c-title" v-else>数据修改</div>
  28. <el-form v-if="m">
  29. <sa-item type="text" name="主键" v-model="m.id" br></sa-item>
  30. <sa-item type="text" name="预申报编号" v-model="m.platSeqNo" br></sa-item>
  31. <sa-item type="text" name="申报单编号" v-model="m.declareId" br></sa-item>
  32. <sa-item type="text" name="1-边民,2-商铺业主或其代理人,3-合作社代表,4-互助组代表" v-model="m.declareType" br></sa-item>
  33. <sa-item type="text" name="申报人姓名" v-model="m.declareName" br></sa-item>
  34. <sa-item type="text" name="身份证号码" v-model="m.idno" br></sa-item>
  35. <sa-item type="text" name="商铺编码" v-model="m.shopNo" br></sa-item>
  36. <sa-item type="text" name="商铺名称" v-model="m.shopName" br></sa-item>
  37. <sa-item type="text" name="申报人类别为3、4时互助组/合作社备案编号" v-model="m.orgPutrecNo" br></sa-item>
  38. <sa-item type="text" name="申报人类别为3、4时互助组/合租社名称" v-model="m.orgName" br></sa-item>
  39. <sa-item type="text" name="申报人类别为4时边民合作社社会统一信用代码" v-model="m.orgScc" br></sa-item>
  40. <sa-item type="text" name="运输工具名称" v-model="m.veNo" br></sa-item>
  41. <sa-item type="text" name="业务模式,进出口标志为进口时,01区内交易、02落地加工、03原装提离。进出口标志为出口时,04:直接出口,05:出口销售。" v-model="m.btrnbBizModecd" br></sa-item>
  42. <sa-item type="text" name="商品流向,进出口标志为进口时,必填,01-二次销售;02-生活自用;03-落地加工;" v-model="m.gFlow" br></sa-item>
  43. <sa-item type="text" name="进出口标志:I进口E出口" v-model="m.iEFlag" br></sa-item>
  44. <sa-item type="text" name="监管场所编号" v-model="m.fieldCode" br></sa-item>
  45. <sa-item type="text" name="监管场所名称" v-model="m.fieldName" br></sa-item>
  46. <sa-item type="text" name="申报口岸代码" v-model="m.customsCode" br></sa-item>
  47. <sa-item type="text" name="1-是、0-否" v-model="m.carPool" br></sa-item>
  48. <sa-item type="text" name="总金额" v-model="m.sumAmt" br></sa-item>
  49. <sa-item type="text" name="总毛重" v-model="m.sumGrossWt" br></sa-item>
  50. <sa-item type="text" name="总净重" v-model="m.sumNetWt" br></sa-item>
  51. <sa-item type="text" name="运输方式" v-model="m.trafMode" br></sa-item>
  52. <sa-item type="text" name="币制" v-model="m.currCode" br></sa-item>
  53. <sa-item type="text" name="件数,正整数" v-model="m.packNo" br></sa-item>
  54. <sa-item type="text" name="申报时间:yyyy-MM-ddHH:mm:ss" v-model="m.declTime" br></sa-item>
  55. <sa-item type="text" name="提运单号" v-model="m.billNo" br></sa-item>
  56. <sa-item type="text" name="运输工具航次号" v-model="m.voyageNo" br></sa-item>
  57. <sa-item type="text" name="商品名称,多个用英文逗号分割" v-model="m.goodsNames" br></sa-item>
  58. <sa-item type="text" name="购买边民列表[{"platSeqNo":"进出境申报单预申报编号","borderName":"边民姓名","idno":"身份证号","borderPutrecNo":"边民备案编号","settleBillNo":"结算单号","buyAmount":"申报金额","netWt":"净重","grossWt":"毛重","buyQty":"申报数量","buyQty1":"第一数量","buyQty2":"第二数量","preIeportNo":"进出口预申报单号"}]" v-model="m.bordersList" br></sa-item>
  59. <sa-item type="text" name="边民购买商品列表[{"platSeqNo":"进出境申报单预申报编号","borderName":"边民姓名","idno":"身份证号","borderPutrecNo":"边民备案编号","buyAmount":"申报金额","netWt":"净重","grossWt":"毛重","buyQty":"申报数量","buyQty1":"第一数量","buyQty2":"第二数量","preIeportNo":"进出口预申报单号","codeTs":"商品编码","goodsName":"商品名称"}]" v-model="m.borderBuyGoodsList" br></sa-item>
  60. <sa-item type="text" name="商铺卖货物列表[{"platSeqNo":"进出境申报单预申报编号","gNo":"预申报编号","codeTs":"商品编码","gName":"商品名称","gModel":"规格型号","storageEnvm":"储存条件:常温1:冷藏,2:冷冻:3","useTo":"用途:01食用、02工业用、03药用、04种用、05饲用、06其他","grossWt":"毛重","netWt":"净重","originCountry":"产销国","gQty":"货物数量","qty1":"第一数量","qty2":"第二数量","gUnit":"计量单位","unit1":"第一计量单位","unit2":"第二计量单位","declPrice":"单价","declTotal":"总价"}]" v-model="m.sellGoodsList" br></sa-item>
  61. <sa-item type="text" name="完成状态" v-model="m.finishStatus" br></sa-item>
  62. <sa-item type="text" name="创建时间" v-model="m.createTime" br></sa-item>
  63. <sa-item type="text" name="" v-model="m.preNo" br></sa-item>
  64. <sa-item name="" class="s-ok" br>
  65. <el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
  66. </sa-item>
  67. </el-form>
  68. </div>
  69. </div>
  70. <!-- ------- 底部按钮 ------- -->
  71. <div class="s-foot">
  72. <el-button type="primary" @click="ok()">确定</el-button>
  73. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  74. </div>
  75. </div>
  76. <script>
  77. var app = new Vue({
  78. components: {
  79. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
  80. },
  81. el: '.vue-box',
  82. data: {
  83. id: sa.p('id', 0), // 获取超链接中的id参数(0=添加,非0=修改)
  84. m: null, // 实体对象
  85. },
  86. methods: {
  87. // 创建一个 默认Model
  88. createModel: function() {
  89. return {
  90. id: '', // 主键
  91. platSeqNo: '', // 预申报编号
  92. declareId: '', // 申报单编号
  93. declareType: '', // 1-边民,2-商铺业主或其代理人,3-合作社代表,4-互助组代表
  94. declareName: '', // 申报人姓名
  95. idno: '', // 身份证号码
  96. shopNo: '', // 商铺编码
  97. shopName: '', // 商铺名称
  98. orgPutrecNo: '', // 申报人类别为3、4 时互助组/合作社备案编号
  99. orgName: '', // 申报人类别为3、4 时互助组/合租社名称
  100. orgScc: '', // 申报人类别为4 时边民合作社社会统一信用代码
  101. veNo: '', // 运输工具名称
  102. btrnbBizModecd: '', // 业务模式, 进出口标志为进口时,01 区内交易、02 落地加工、03 原装提离。进出口标 志 为 出 口时,04:直接出口,05:出口销售。
  103. gFlow: '', // 商品流向, 进出口标志为进口时,必填,01-二次销售;02-生活自用;03-落地加工;
  104. iEFlag: '', // 进出口标志:I进口 E 出口
  105. fieldCode: '', // 监管场所编号
  106. fieldName: '', // 监管场所名称
  107. customsCode: '', // 申报口岸代码
  108. carPool: '', // 1-是、0-否
  109. sumAmt: '', // 总金额
  110. sumGrossWt: '', // 总毛重
  111. sumNetWt: '', // 总净重
  112. trafMode: '', // 运输方式
  113. currCode: '', // 币制
  114. packNo: '', // 件数,正整数
  115. declTime: '', // 申 报 时 间 :yyyy-MM-dd HH:mm:ss
  116. billNo: '', // 提运单号
  117. voyageNo: '', // 运输工具航次(班)号
  118. goodsNames: '', // 商品名称,多个用英文逗号分割
  119. bordersList: '', // 购买边民列表[ { "platSeqNo": "进出境申报单预申报编号", "borderName": "边民姓名", "idno": "身份证号", "borderPutrecNo": "边民备案编号", "settleBillNo": "结算单号", "buyAmount": "申报金额", "netWt": "净重", "grossWt": "毛重", "buyQty": "申报数量", "buyQty1": "第一数量", "buyQty2": "第二数量", "preIeportNo": "进出口预申报单号" }]
  120. borderBuyGoodsList: '', // 边民购买商品列表[ { "platSeqNo": "进出境申报单预申报编号", "borderName": "边民姓名", "idno": "身份证号", "borderPutrecNo": "边民备案编号", "buyAmount": "申报金额", "netWt": "净重", "grossWt": "毛重", "buyQty": "申报数量", "buyQty1": "第一数量", "buyQty2": "第二数量", "preIeportNo": "进出口预申报单号", "codeTs": "商品编码", "goodsName": "商品名称" }]
  121. sellGoodsList: '', // 商铺卖货物列表[ { "platSeqNo": "进出境申报单预申报编号", "gNo": "预申报编号", "codeTs": "商品编码", "gName": "商品名称", "gModel": "规格型号", "storageEnvm": "储存条件:常温 1:冷藏,2:冷冻:3", "useTo": "用途:01 食用、02 工业用、03 药用、04 种用、05 饲用、06 其他", "grossWt": "毛重", "netWt": "净重", "originCountry": "产销国", "gQty": "货物数量", "qty1": "第一数量", "qty2": "第二数量", "gUnit": "计量单位", "unit1": "第一计量单位", "unit2": "第二计量单位", "declPrice": "单价", "declTotal": "总价" }]
  122. finishStatus: '', // 完成状态
  123. createTime: '', // 创建时间
  124. preNo: '', //
  125. }
  126. },
  127. // 提交数据
  128. ok: function(){
  129. // 表单校验
  130. let m = this.m;
  131. sa.checkNull(m.id, '请输入 [主键]');
  132. sa.checkNull(m.platSeqNo, '请输入 [预申报编号]');
  133. sa.checkNull(m.declareId, '请输入 [申报单编号]');
  134. sa.checkNull(m.declareType, '请输入 [1-边民,2-商铺业主或其代理人,3-合作社代表,4-互助组代表]');
  135. sa.checkNull(m.declareName, '请输入 [申报人姓名]');
  136. sa.checkNull(m.idno, '请输入 [身份证号码]');
  137. sa.checkNull(m.shopNo, '请输入 [商铺编码]');
  138. sa.checkNull(m.shopName, '请输入 [商铺名称]');
  139. sa.checkNull(m.orgPutrecNo, '请输入 [申报人类别为3、4时互助组/合作社备案编号]');
  140. sa.checkNull(m.orgName, '请输入 [申报人类别为3、4时互助组/合租社名称]');
  141. sa.checkNull(m.orgScc, '请输入 [申报人类别为4时边民合作社社会统一信用代码]');
  142. sa.checkNull(m.veNo, '请输入 [运输工具名称]');
  143. sa.checkNull(m.btrnbBizModecd, '请输入 [业务模式,进出口标志为进口时,01区内交易、02落地加工、03原装提离。进出口标志为出口时,04:直接出口,05:出口销售。]');
  144. sa.checkNull(m.gFlow, '请输入 [商品流向,进出口标志为进口时,必填,01-二次销售;02-生活自用;03-落地加工;]');
  145. sa.checkNull(m.iEFlag, '请输入 [进出口标志:I进口E出口]');
  146. sa.checkNull(m.fieldCode, '请输入 [监管场所编号]');
  147. sa.checkNull(m.fieldName, '请输入 [监管场所名称]');
  148. sa.checkNull(m.customsCode, '请输入 [申报口岸代码]');
  149. sa.checkNull(m.carPool, '请输入 [1-是、0-否]');
  150. sa.checkNull(m.sumAmt, '请输入 [总金额]');
  151. sa.checkNull(m.sumGrossWt, '请输入 [总毛重]');
  152. sa.checkNull(m.sumNetWt, '请输入 [总净重]');
  153. sa.checkNull(m.trafMode, '请输入 [运输方式]');
  154. sa.checkNull(m.currCode, '请输入 [币制]');
  155. sa.checkNull(m.packNo, '请输入 [件数,正整数]');
  156. sa.checkNull(m.declTime, '请输入 [申报时间:yyyy-MM-ddHH:mm:ss]');
  157. sa.checkNull(m.billNo, '请输入 [提运单号]');
  158. sa.checkNull(m.voyageNo, '请输入 [运输工具航次号]');
  159. sa.checkNull(m.goodsNames, '请输入 [商品名称,多个用英文逗号分割]');
  160. sa.checkNull(m.bordersList, '请输入 [购买边民列表[{"platSeqNo":"进出境申报单预申报编号","borderName":"边民姓名","idno":"身份证号","borderPutrecNo":"边民备案编号","settleBillNo":"结算单号","buyAmount":"申报金额","netWt":"净重","grossWt":"毛重","buyQty":"申报数量","buyQty1":"第一数量","buyQty2":"第二数量","preIeportNo":"进出口预申报单号"}]]');
  161. sa.checkNull(m.borderBuyGoodsList, '请输入 [边民购买商品列表[{"platSeqNo":"进出境申报单预申报编号","borderName":"边民姓名","idno":"身份证号","borderPutrecNo":"边民备案编号","buyAmount":"申报金额","netWt":"净重","grossWt":"毛重","buyQty":"申报数量","buyQty1":"第一数量","buyQty2":"第二数量","preIeportNo":"进出口预申报单号","codeTs":"商品编码","goodsName":"商品名称"}]]');
  162. sa.checkNull(m.sellGoodsList, '请输入 [商铺卖货物列表[{"platSeqNo":"进出境申报单预申报编号","gNo":"预申报编号","codeTs":"商品编码","gName":"商品名称","gModel":"规格型号","storageEnvm":"储存条件:常温1:冷藏,2:冷冻:3","useTo":"用途:01食用、02工业用、03药用、04种用、05饲用、06其他","grossWt":"毛重","netWt":"净重","originCountry":"产销国","gQty":"货物数量","qty1":"第一数量","qty2":"第二数量","gUnit":"计量单位","unit1":"第一计量单位","unit2":"第二计量单位","declPrice":"单价","declTotal":"总价"}]]');
  163. sa.checkNull(m.finishStatus, '请输入 [完成状态]');
  164. sa.checkNull(m.createTime, '请输入 [创建时间]');
  165. sa.checkNull(m.preNo, '请输入 []');
  166. // 开始增加或修改
  167. if(this.id <= 0) { // 添加
  168. sa.ajax('/HtTradeSettlement/add', m, function(res){
  169. sa.alert('增加成功', this.clean);
  170. }.bind(this));
  171. } else { // 修改
  172. sa.ajax('/HtTradeSettlement/update', m, function(res){
  173. sa.alert('修改成功', this.clean);
  174. }.bind(this));
  175. }
  176. },
  177. // 添加/修改 完成后的动作
  178. clean: function() {
  179. if(this.id == 0) {
  180. this.m = this.createModel();
  181. } else {
  182. parent.app.f5(); // 刷新父页面列表
  183. sa.closeCurrIframe(); // 关闭本页
  184. }
  185. }
  186. },
  187. mounted: function(){
  188. // 初始化数据
  189. if(this.id <= 0) {
  190. this.m = this.createModel();
  191. } else {
  192. sa.ajax('/HtTradeSettlement/getById?id=' + this.id, function(res) {
  193. this.m = res.data;
  194. if(res.data == null) {
  195. sa.alert('未能查找到 id=' + this.id + " 详细数据");
  196. }
  197. }.bind(this))
  198. }
  199. }
  200. })
  201. </script>
  202. </body>
  203. </html>