tb-order-add.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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.tradeAreaId" br></sa-item>
  30. <sa-item type="text" name="" v-model="m.tradeAreaName" br></sa-item>
  31. <sa-item type="text" name="" v-model="m.addressIds" br></sa-item>
  32. <sa-item type="text" name="" v-model="m.saleMainId" br></sa-item> -->
  33. <el-row :gutter="50">
  34. <el-col :span="12">
  35. <sa-item type="text" name="订单号" v-model="m.tradeNo" br></sa-item>
  36. </el-col>
  37. <el-col :span="12">
  38. <sa-item type="text" name="买家" v-model="m.buyUserName" br></sa-item>
  39. </el-col>
  40. </el-row>
  41. <el-row :gutter="50">
  42. <el-col :span="12">
  43. <sa-item type="num" name="购买用户类型" v-model="m.buyUserType" br></sa-item>
  44. </el-col>
  45. <el-col :span="12">
  46. <sa-item type="text" name="商家名称" v-model="m.enterpriseName" br></sa-item>
  47. </el-col>
  48. </el-row>
  49. <el-row :gutter="50">
  50. <el-col :span="12">
  51. <sa-item type="text" name="总重量" v-model="m.totalWeight" br></sa-item>
  52. </el-col>
  53. <el-col :span="12">
  54. <sa-item type="text" name="总金额" v-model="m.totalPrice" br></sa-item>
  55. </el-col>
  56. </el-row>
  57. <el-row :gutter="50">
  58. <el-col :span="12">
  59. <sa-item type="datetime" name="交易时间" v-model="m.tradeTime" br></sa-item>
  60. </el-col>
  61. <el-col :span="12">
  62. <sa-item type="enum" name="交易状态" v-model="m.tradeStatus" :jv="{0: '未支付', 1: '已支付'}" jtype="3" br></sa-item>
  63. </el-col>
  64. </el-row>
  65. <el-row :gutter="50">
  66. <el-col :span="12">
  67. <sa-item type="text" name="支付方式" v-model="m.payType" br></sa-item>
  68. </el-col>
  69. <el-col :span="12">
  70. <sa-item type="text" name="结算时间" v-model="m.settleTime" br></sa-item>
  71. </el-col>
  72. </el-row>
  73. <el-row :gutter="50">
  74. <el-col :span="12">
  75. <sa-item type="text" name="当前结算金额" v-model="m.realPrice" br></sa-item>
  76. </el-col>
  77. <el-col :span="12">
  78. <sa-item type="text" name="应结金额" v-model="m.shouldPrice" br></sa-item>
  79. </el-col>
  80. </el-row>
  81. <el-row :gutter="50">
  82. <el-col :span="12">
  83. <sa-item type="text" name="对账人" v-model="m.settleUserId" br></sa-item>
  84. </el-col>
  85. <el-col :span="12">
  86. <sa-item type="text" name="对账人员" v-model="m.recordUserId" br></sa-item>
  87. </el-col>
  88. </el-row>
  89. <el-row :gutter="50">
  90. <el-col :span="12">
  91. <sa-item type="text" name="对账时间" v-model="m.recordTime" br></sa-item>
  92. </el-col>
  93. <el-col :span="12">
  94. <sa-item type="text" name="是否对账" v-model="m.record" br></sa-item>
  95. </el-col>
  96. </el-row>
  97. <el-row :gutter="50">
  98. <el-col :span="12">
  99. <sa-item type="text" name="退款原因" v-model="m.refundReason" br></sa-item>
  100. </el-col>
  101. <el-col :span="12">
  102. <sa-item type="text" name="退款时间" v-model="m.refundTime" br></sa-item>
  103. </el-col>
  104. </el-row>
  105. <el-row :gutter="50">
  106. <el-col :span="12">
  107. <sa-item type="text" name="出互市区时间" v-model="m.outTime" br></sa-item>
  108. </el-col>
  109. <el-col :span="12">
  110. <sa-item type="text" name="商品名称" v-model="m.goodsNames" br></sa-item>
  111. </el-col>
  112. </el-row>
  113. <el-row :gutter="50">
  114. <el-col :span="12">
  115. <sa-item type="text" name="是否申报" v-model="m.apply" br></sa-item>
  116. </el-col>
  117. <el-col :span="12">
  118. <sa-item type="text" name="申报时间" v-model="m.applyTime" br></sa-item>
  119. </el-col>
  120. </el-row>
  121. <el-row :gutter="50">
  122. <el-col :span="12">
  123. <sa-item type="text" name="申报结果" v-model="m.applyResult" br></sa-item>
  124. </el-col>
  125. <el-col :span="12">
  126. <sa-item type="enum" name="分配方式" v-model="m.distribution" :jv="{0: '均分', 1: '自选数量'}" jtype="3" br></sa-item>
  127. </el-col>
  128. </el-row>
  129. <el-row :gutter="50">
  130. <el-col :span="12">
  131. <sa-item type="enum" name="是否确认" v-model="m.confirm" :jv="{0: '否', 1: '是'}" jtype="3" br></sa-item>
  132. </el-col>
  133. <el-col :span="12">
  134. <sa-item type="text" name="是否接单" v-model="m.pick" br></sa-item>
  135. </el-col>
  136. </el-row>
  137. <el-row :gutter="50">
  138. <el-col :span="12">
  139. <sa-item type="text" name="接单时间" v-model="m.pickTime" br></sa-item>
  140. </el-col>
  141. <el-col :span="12">
  142. <sa-item type="text" name="是否发货" v-model="m.send" br></sa-item>
  143. </el-col>
  144. </el-row>
  145. <el-row :gutter="50">
  146. <el-col :span="12">
  147. <sa-item type="text" name="发货时间" v-model="m.sendTime" br></sa-item>
  148. </el-col>
  149. </el-row>
  150. <!-- <sa-item type="text" name="" v-model="m.receiveName" br></sa-item>
  151. <sa-item type="text" name="" v-model="m.receivePhone" br></sa-item>
  152. <sa-item type="text" name="" v-model="m.receiveAddress" br></sa-item> -->
  153. <!-- <sa-item type="text" name="" v-model="m.applyFailReason" br></sa-item> -->
  154. <!-- <sa-item type="text" name="" v-model="m.shopId" br></sa-item>
  155. <sa-item type="text" name="" v-model="m.shopName" br></sa-item> -->
  156. <!-- <sa-item type="text" name="对应二级市场中的收购单ID" v-model="m.levelTwoOrderId" br></sa-item> -->
  157. <!-- <sa-item type="enum" name="删除状态" v-model="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" jtype="3" br></sa-item> -->
  158. <sa-item name="" class="s-ok" br>
  159. <el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
  160. </sa-item>
  161. </el-form>
  162. </div>
  163. </div>
  164. <!-- ------- 底部按钮 ------- -->
  165. <div class="s-foot">
  166. <el-button type="primary" @click="ok()">确定</el-button>
  167. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  168. </div>
  169. </div>
  170. <script>
  171. var app = new Vue({
  172. components: {
  173. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
  174. },
  175. el: '.vue-box',
  176. data: {
  177. id: sa.p('id', 0), // 获取超链接中的id参数(0=添加,非0=修改)
  178. m: null, // 实体对象
  179. },
  180. methods: {
  181. // 创建一个 默认Model
  182. createModel: function() {
  183. return {
  184. id: '', // 主键
  185. tradeAreaId: '', //
  186. tradeAreaName: '', //
  187. addressIds: '', //
  188. saleMainId: '', //
  189. tradeNo: '', // 订单号
  190. buyUserId: '', // 买家ID
  191. buyUserName: '', // 买家
  192. buyUserType: '', // 购买用户类型(3=边民,2=组长)
  193. enterpriseId: '', // 商家ID
  194. enterpriseName: '', // 商家名称
  195. totalWeight: '', // 总重量
  196. totalPrice: '', // 总金额
  197. tradeTime: '', // 交易时间
  198. tradeStatus: '', // 交易状态(0=未支付,1=已支付)
  199. payType: '', // 支付方式(0=金融互助,1=现金刷卡)
  200. settleTime: '', // 结算时间
  201. realPrice: '', // 当前结算金额
  202. shouldPrice: '', // 应结金额
  203. settleUserId: '', // 对账人
  204. recordUserId: '', // 对账人员
  205. recordTime: '', // 对账时间
  206. record: '', // 是否对账(0=否,)
  207. refundReason: '', // 退款原因
  208. refundTime: '', // 退款时间
  209. receiveName: '', //
  210. receivePhone: '', //
  211. receiveAddress: '', //
  212. outTime: '', // 出互市区时间
  213. goodsNames: '', // 商品名称字符串
  214. apply: '', // 是否申报
  215. applyTime: '', // 申报时间
  216. applyResult: '', // 申报结果
  217. applyFailReason: '', //
  218. distribution: '', // 分配方式(0=均分,1=自选数量)
  219. confirm: '', // 是否确认(0=否,1=是)
  220. pick: '', // 是否接单
  221. pickTime: '', // 接单时间
  222. shopId: '', //
  223. shopName: '', //
  224. send: '', // 是否发货
  225. sendTime: '', // 发货时间
  226. levelTwoOrderId: '', // 对应二级市场中的收购单ID
  227. createTime: '', // 创建时间
  228. createBy: '', // 创建人编号
  229. createName: '', // 创建人名称
  230. updateTime: '', // 更新时间
  231. updateBy: '', // 更新人编号
  232. updateName: '', // 更新人名称
  233. deleteStatus: '', // 删除状态(0=禁用,1=启用)
  234. }
  235. },
  236. // 提交数据
  237. ok: function(){
  238. // 表单校验
  239. let m = this.m;
  240. // sa.checkNull(m.id, '请输入 [主键]');
  241. sa.checkNull(m.tradeAreaId, '请输入 []');
  242. sa.checkNull(m.tradeAreaName, '请输入 []');
  243. sa.checkNull(m.addressIds, '请输入 []');
  244. sa.checkNull(m.saleMainId, '请输入 []');
  245. sa.checkNull(m.tradeNo, '请输入 [订单号]');
  246. // sa.checkNull(m.buyUserId, '请输入 [买家ID]');
  247. sa.checkNull(m.buyUserName, '请输入 [买家]');
  248. sa.checkNull(m.buyUserType, '请输入 [购买用户类型]');
  249. // sa.checkNull(m.enterpriseId, '请输入 [商家ID]');
  250. sa.checkNull(m.enterpriseName, '请输入 [商家名称]');
  251. sa.checkNull(m.totalWeight, '请输入 [总重量]');
  252. sa.checkNull(m.totalPrice, '请输入 [总金额]');
  253. sa.checkNull(m.tradeTime, '请输入 [交易时间]');
  254. sa.checkNull(m.tradeStatus, '请输入 [交易状态]');
  255. sa.checkNull(m.payType, '请输入 [支付方式]');
  256. sa.checkNull(m.settleTime, '请输入 [结算时间]');
  257. sa.checkNull(m.realPrice, '请输入 [当前结算金额]');
  258. sa.checkNull(m.shouldPrice, '请输入 [应结金额]');
  259. sa.checkNull(m.settleUserId, '请输入 [对账人]');
  260. sa.checkNull(m.recordUserId, '请输入 [对账人员]');
  261. sa.checkNull(m.recordTime, '请输入 [对账时间]');
  262. sa.checkNull(m.record, '请输入 [是否对账]');
  263. sa.checkNull(m.refundReason, '请输入 [退款原因]');
  264. sa.checkNull(m.refundTime, '请输入 [退款时间]');
  265. sa.checkNull(m.receiveName, '请输入 []');
  266. sa.checkNull(m.receivePhone, '请输入 []');
  267. sa.checkNull(m.receiveAddress, '请输入 []');
  268. sa.checkNull(m.outTime, '请输入 [出互市区时间]');
  269. sa.checkNull(m.goodsNames, '请输入 [商品名称字符串]');
  270. sa.checkNull(m.apply, '请输入 [是否申报]');
  271. sa.checkNull(m.applyTime, '请输入 [申报时间]');
  272. sa.checkNull(m.applyResult, '请输入 [申报结果]');
  273. sa.checkNull(m.applyFailReason, '请输入 []');
  274. sa.checkNull(m.distribution, '请输入 [分配方式]');
  275. sa.checkNull(m.confirm, '请输入 [是否确认]');
  276. sa.checkNull(m.pick, '请输入 [是否接单]');
  277. sa.checkNull(m.pickTime, '请输入 [接单时间]');
  278. sa.checkNull(m.shopId, '请输入 []');
  279. sa.checkNull(m.shopName, '请输入 []');
  280. sa.checkNull(m.send, '请输入 [是否发货]');
  281. sa.checkNull(m.sendTime, '请输入 [发货时间]');
  282. sa.checkNull(m.levelTwoOrderId, '请输入 [对应二级市场中的收购单ID]');
  283. sa.checkNull(m.createTime, '请输入 [创建时间]');
  284. sa.checkNull(m.createBy, '请输入 [创建人编号]');
  285. sa.checkNull(m.createName, '请输入 [创建人名称]');
  286. sa.checkNull(m.updateTime, '请输入 [更新时间]');
  287. sa.checkNull(m.updateBy, '请输入 [更新人编号]');
  288. sa.checkNull(m.updateName, '请输入 [更新人名称]');
  289. sa.checkNull(m.deleteStatus, '请输入 [删除状态]');
  290. // 开始增加或修改
  291. if(this.id <= 0) { // 添加
  292. sa.ajax('/level-one-server/TbOrder/add', m, function(res){
  293. sa.alert('增加成功', this.clean);
  294. }.bind(this));
  295. } else { // 修改
  296. sa.ajax('/level-one-server/TbOrder/update', m, function(res){
  297. sa.alert('修改成功', this.clean);
  298. }.bind(this));
  299. }
  300. },
  301. // 添加/修改 完成后的动作
  302. clean: function() {
  303. if(this.id == 0) {
  304. this.m = this.createModel();
  305. } else {
  306. parent.app.f5(); // 刷新父页面列表
  307. sa.closeCurrIframe(); // 关闭本页
  308. }
  309. }
  310. },
  311. mounted: function(){
  312. // 初始化数据
  313. if(this.id <= 0) {
  314. this.m = this.createModel();
  315. } else {
  316. sa.ajax('/level-one-server/TbOrder/getById?id=' + this.id, function(res) {
  317. this.m = res.data;
  318. if(res.data == null) {
  319. sa.alert('未能查找到 id=' + this.id + " 详细数据");
  320. }
  321. }.bind(this))
  322. }
  323. }
  324. })
  325. </script>
  326. </body>
  327. </html>