| | |
| | | /** |
| | | * 报关 |
| | | */ |
| | | public function setDeclareData() |
| | | public function setTrackingData() |
| | | { |
| | | if (IS_POST) { |
| | | $json = I("post.jsonStr"); |
| | | $ps = new SOBillTrackingService(); |
| | | $this->ajaxReturn($ps->setDeclareData($json)); |
| | | $this->ajaxReturn($ps->setTrackingData($json)); |
| | | } |
| | | } |
| | | } |
| | |
| | | s.id sobill_id, |
| | | sd.id sobill_detail_id, |
| | | date_format(s.deal_date, '%%Y-%%m-%%d') sobill_deal_date, |
| | | wb.id wsbill_id, |
| | | wbd.id wsbill_detail_id, |
| | | wb.wsbill_id, |
| | | wb.wsbill_detail_id, |
| | | sd.goods_id goods_id, |
| | | s.customer_id customer_id, |
| | | c. NAME customer_name, |
| | |
| | | g. NAME good_name, |
| | | 0+cast(sd.goods_count as char) goods_count, |
| | | gu. NAME unit_name, |
| | | wb.ref wsbill_no, |
| | | wb.wsbill_no, |
| | | date_format(wb.bizdt, '%%Y-%%m-%%d') wsbill_biz_dt, |
| | | 0+cast(wbd.goods_count as char) ws_goods_count, |
| | | 0+cast(wb.goods_count as char) ws_goods_count, |
| | | st.declare_no, |
| | | date_format(st.declare_time, '%%Y-%%m-%%d') declare_time, |
| | | u1. NAME declare_user_name, |
| | |
| | | FROM |
| | | t_so_bill s |
| | | INNER JOIN t_so_bill_detail sd ON s.id = sd.sobill_id |
| | | LEFT JOIN t_ws_bill_detail wbd ON sd.id = wbd.sobilldetail_id |
| | | LEFT JOIN t_ws_bill wb ON wb.id = wbd.wsbill_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | wb.id wsbill_id, |
| | | wbd.id wsbill_detail_id, |
| | | wb.ref wsbill_no, |
| | | wb.bizdt, |
| | | wbd.goods_count, |
| | | wb.bill_status, |
| | | wbd.sobilldetail_id |
| | | FROM |
| | | t_ws_bill wb |
| | | INNER JOIN t_ws_bill_detail wbd ON wb.id = wbd.wsbill_id |
| | | WHERE |
| | | wb.bill_status > 0 |
| | | ) wb ON wb.sobilldetail_id = sd.id |
| | | LEFT JOIN t_sc_bill_detail sbd ON sbd.id = sd.scbilldetail_id |
| | | LEFT JOIN t_sc_bill sb ON sb.id = sbd.scbill_id |
| | | LEFT JOIN t_so_bill_tracking st ON s.id = st.sobill_id |
| | | AND sd.id = st.sobill_detail_id |
| | | AND wbd.id = st.wsbill_detail_id |
| | | AND wb.wsbill_detail_id = st.wsbill_detail_id |
| | | LEFT JOIN t_customer c ON s.customer_id = c.id |
| | | LEFT JOIN t_goods g ON g.id = sd.goods_id |
| | | LEFT JOIN t_goods_unit gu ON g.unit_id = gu.id |
| | |
| | | $queryParams[] = "%$sobillNo%"; |
| | | } |
| | | |
| | | $sql .= " order by s.deal_date desc, s.ref desc |
| | | $sql .= " order by s.deal_date desc, s.ref desc,sd.goods_id asc |
| | | limit %d , %d"; |
| | | $queryParams[] = $start; |
| | | $queryParams[] = $limit; |
| | |
| | | FROM |
| | | t_so_bill s |
| | | INNER JOIN t_so_bill_detail sd ON s.id = sd.sobill_id |
| | | LEFT JOIN t_ws_bill_detail wbd ON sd.id = wbd.sobilldetail_id |
| | | LEFT JOIN t_ws_bill wb ON wb.id = wbd.wsbill_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | wb.id wsbill_id, |
| | | wbd.id wsbill_detail_id, |
| | | wb.ref wsbill_no, |
| | | wb.bizdt, |
| | | wbd.goods_count, |
| | | wb.bill_status, |
| | | wbd.sobilldetail_id |
| | | FROM |
| | | t_ws_bill wb |
| | | INNER JOIN t_ws_bill_detail wbd ON wb.id = wbd.wsbill_id |
| | | WHERE |
| | | wb.bill_status > 0 |
| | | ) wb ON wb.sobilldetail_id = sd.id |
| | | LEFT JOIN t_sc_bill_detail sbd ON sbd.id = sd.scbilldetail_id |
| | | LEFT JOIN t_sc_bill sb ON sb.id = sbd.scbill_id |
| | | LEFT JOIN t_so_bill_tracking st ON s.id = st.sobill_id |
| | | AND sd.id = st.sobill_detail_id |
| | | AND wbd.id = st.wsbill_detail_id |
| | | AND wb.wsbill_detail_id = st.wsbill_detail_id |
| | | LEFT JOIN t_customer c ON s.customer_id = c.id |
| | | LEFT JOIN t_goods g ON g.id = sd.goods_id |
| | | LEFT JOIN t_goods_unit gu ON g.unit_id = gu.id |
| | |
| | | LEFT JOIN t_user u4 ON u4.id = st.release_user_id |
| | | LEFT JOIN t_user u5 ON u5.id = st.pick_up_user_id |
| | | LEFT JOIN t_user u6 ON u6.id = st.unload_user_id |
| | | WHERE 1 = 1 "; |
| | | WHERE |
| | | 1 = 1 "; |
| | | $queryParams = array(); |
| | | $ds = new DataOrgDAO($db); |
| | | $rs = $ds->buildSQL(FIdConst::SO_BILL_TRACKING, "s", $loginUserId); |
| | |
| | | * @param array $bill |
| | | * @return null|array |
| | | */ |
| | | public function setDeclareData(&$bill) |
| | | public function setTrackingData(&$bill) |
| | | { |
| | | $db = $this->db; |
| | | |
| | | $id = $bill["sobill_tacking_id"]; |
| | | if(!empty($id)){ |
| | | if(empty($id)){ |
| | | $id = $this->newId(); |
| | | } |
| | | |
| | |
| | | $goodsId = $bill["goodsId"]; |
| | | $declareNo = $bill["declareNo"]; |
| | | $time = $bill["time"]; |
| | | $fid = $bill["fid"]; |
| | | |
| | | if (!$this->dateIsValid($time)) { |
| | | return $this->bad("报关日期不正确"); |
| | | } |
| | |
| | | `sobill_detail_id`, |
| | | `wsbill_id`, |
| | | `wsbill_detail_id`, |
| | | `goods_id`, |
| | | `declare_no`, |
| | | `declare_time`, |
| | | `declare_user_id` |
| | | ) |
| | | VALUES |
| | | ('%s', '%s', '%s', '%s', '%s', '%s', |
| | | '%s', '%s', '%s') |
| | | ON duplicate KEY UPDATE |
| | | `goods_id`='%s', |
| | | `declare_no`='%s', |
| | | `declare_time`='%s', |
| | | `declare_user_id`='%s' |
| | | `goods_id` |
| | | "; |
| | | $rc = $db->execute( |
| | | $sql, |
| | | $id, |
| | | $soBillId, |
| | | $soBillDetailId, |
| | | $wsBillId, |
| | | $wsBillDetailId, |
| | | $goodsId, |
| | | $declareNo, |
| | | $time, |
| | | $loginUserId, |
| | | $goodsId, |
| | | $declareNo, |
| | | $time, |
| | | $loginUserId |
| | | ); |
| | | switch($fid){ |
| | | // 报关 |
| | | case FIdConst::SO_BILL_TRACKING_DECLARE: |
| | | $sql .= ",`declare_no`,`declare_time`,`declare_user_id`) "; |
| | | $sql .= " VALUES('%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')"; |
| | | $sql .= " ON duplicate KEY UPDATE `goods_id`='%s',`declare_no`='%s',`declare_time`='%s',`declare_user_id`='%s' "; |
| | | break; |
| | | // 检疫 |
| | | case FIdConst::SO_BILL_TRACKING_QUARANTINE: |
| | | $sql .= ",`quarantine_time`,`quarantine_user_id`) "; |
| | | $sql .= " VALUES('%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')"; |
| | | $sql .= " ON duplicate KEY UPDATE `goods_id`='%s',`quarantine_time`='%s',`quarantine_user_id`='%s' "; |
| | | break; |
| | | // 查验 |
| | | case FIdConst::SO_BILL_TRACKING_CHECK: |
| | | $sql .= ",`check_time`,`check_user_id`) "; |
| | | $sql .= " VALUES('%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')"; |
| | | $sql .= " ON duplicate KEY UPDATE `goods_id`='%s',`check_time`='%s',`check_user_id`='%s' "; |
| | | break; |
| | | // 施行 |
| | | case FIdConst::SO_BILL_TRACKING_RELEASE: |
| | | $sql .= ",`release_time`,`release_user_id`) "; |
| | | $sql .= " VALUES('%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')"; |
| | | $sql .= " ON duplicate KEY UPDATE `goods_id`='%s',`release_time`='%s',`release_user_id`='%s' "; |
| | | break; |
| | | // 提货 |
| | | case FIdConst::SO_BILL_TRACKING_PICK_UP: |
| | | $sql .= ",`pick_up_time`,`pick_up_user_id`) "; |
| | | $sql .= " VALUES('%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')"; |
| | | $sql .= " ON duplicate KEY UPDATE `goods_id`='%s',`pick_up_time`='%s',`pick_up_user_id`='%s' "; |
| | | break; |
| | | // 卸货 |
| | | case FIdConst::SO_BILL_TRACKING_UNLOAD: |
| | | $sql .= ",`unload_time`,`unload_user_id`) "; |
| | | $sql .= " VALUES('%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')"; |
| | | $sql .= " ON duplicate KEY UPDATE `goods_id`='%s',`unload_time`='%s',`unload_user_id`='%s' "; |
| | | break; |
| | | default: |
| | | } |
| | | |
| | | if($fid == FIdConst::SO_BILL_TRACKING_DECLARE){ |
| | | $rc = $db->execute( |
| | | $sql, |
| | | $id, |
| | | $soBillId, |
| | | $soBillDetailId, |
| | | $wsBillId, |
| | | $wsBillDetailId, |
| | | $goodsId, |
| | | $declareNo, |
| | | $time, |
| | | $loginUserId, |
| | | $goodsId, |
| | | $declareNo, |
| | | $time, |
| | | $loginUserId |
| | | ); |
| | | }else{ |
| | | $rc = $db->execute( |
| | | $sql, |
| | | $id, |
| | | $soBillId, |
| | | $soBillDetailId, |
| | | $wsBillId, |
| | | $wsBillDetailId, |
| | | $goodsId, |
| | | $time, |
| | | $loginUserId, |
| | | $goodsId, |
| | | $time, |
| | | $loginUserId |
| | | ); |
| | | } |
| | | |
| | | if ($rc === false) { |
| | | return $this->sqlError(__METHOD__, __LINE__); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 报关 |
| | | */ |
| | | public function setDeclareData($json) |
| | | public function setTrackingData($json) |
| | | { |
| | | if ($this->isNotOnline()) { |
| | | return $this->notOnlineError(); |
| | |
| | | $db = $this->db(); |
| | | |
| | | $dao = new SOBillTrackingDAO($db); |
| | | |
| | | |
| | | $log = null; |
| | | // 记录业务日志 |
| | | $bs = new BizlogService($db); |
| | | |
| | | foreach ($bill as $v) { |
| | | foreach ($bill["items"] as $v) { |
| | | $v["loginUserId"] = $this->getLoginUserId(); |
| | | $rc = $dao->setDeclareData($v); |
| | | $rc = $dao->setTrackingData($v); |
| | | if ($rc) { |
| | | $log["failed"][$v["soBillNo"]] = "销售订单号:{$v["soBillNo"]}跟踪报关失败。"; |
| | | $log["failed"][] = "销售订单号:{$v["soBillNo"]},商品:{$v["goodName"]}跟踪报关失败。"; |
| | | $bs->insertBizlog($log["failed"][$v["soBillNo"]], $this->LOG_CATEGORY); |
| | | }else{ |
| | | $log["success"][$v["soBillNo"]] = "销售订单号:{$v["soBillNo"]}跟踪报关成功。"; |
| | | $log["success"][] = "销售订单号:{$v["soBillNo"]},商品:{$v["goodName"]}跟踪报关成功。"; |
| | | $bs->insertBizlog($log["success"][$v["soBillNo"]], $this->LOG_CATEGORY); |
| | | } |
| | | } |
| | |
| | | |
| | | initComponent: function () { |
| | | var me = this; |
| | | |
| | | var t = "订单状态跟踪信息编辑"; |
| | | var map = { |
| | | 'C001-01':'报关', |
| | | 'C001-02':'检疫', |
| | | 'C001-03':'海关查验', |
| | | 'C001-04':'海关放行', |
| | | 'C001-05':'提货', |
| | | 'C001-06':'卸货' |
| | | }; |
| | | var t = "订单状态跟踪信息编辑(" + map[me.getFid()] + ")"; |
| | | var f = "edit-form-money.png"; |
| | | var logoHtml = "<img style='float:left;margin:20px 20px 0px 10px;width:48px;height:48px;' src='" |
| | | + PSI.Const.BASE_URL |
| | |
| | | items: [{ |
| | | xtype: "hidden", |
| | | name: "fid", |
| | | id:"fid", |
| | | value: me.getFid() |
| | | }, { |
| | | id: "declareNo", |
| | | name: "declareNo", |
| | | fieldLabel: "报关单号", |
| | | xtype: "displayfield" |
| | | beforeLabelTextTpl: PSI.Const.REQUIRED, |
| | | xtype: "textfield", |
| | | allowBlank: false, |
| | | blankText: "请输入报关单号。", |
| | | }, { |
| | | id: "time", |
| | | fieldLabel: "日期", |
| | | allowBlank: false, |
| | | blankText: "没有输入日期", |
| | | blankText: "请选择日期。", |
| | | beforeLabelTextTpl: PSI.Const.REQUIRED, |
| | | xtype: "datefield", |
| | | format: "Y-m-d", |
| | |
| | | Ext.get(window).un('beforeunload', me.onWindowBeforeUnload); |
| | | }, |
| | | |
| | | // onWndShow: function () { |
| | | // var me = this; |
| | | onWndShow: function () { |
| | | var me = this; |
| | | |
| | | // Ext.get(window).on('beforeunload', me.onWindowBeforeUnload); |
| | | Ext.get(window).on('beforeunload', me.onWindowBeforeUnload); |
| | | |
| | | if(Ext.getCmp("fid").getValue() == "C001-01"){ |
| | | Ext.getCmp("declareNo").setVisible(true); |
| | | Ext.getCmp("declareNo").setValue(""); |
| | | }else{ |
| | | Ext.getCmp("declareNo").setVisible(false); |
| | | Ext.getCmp("declareNo").setValue("-"); |
| | | } |
| | | }, |
| | | |
| | | // var f = Ext.getCmp("editForm"); |
| | | // var el = f.getEl(); |
| | | // el.mask(PSI.Const.LOADING); |
| | | // Ext.Ajax.request({ |
| | | // url: PSI.Const.BASE_URL + "Home/Funds/rvRecInfo", |
| | | // params: {}, |
| | | // method: "POST", |
| | | // callback: function (options, success, response) { |
| | | // el.unmask(); |
| | | |
| | | // if (success) { |
| | | // var data = Ext.JSON.decode(response.responseText); |
| | | |
| | | // Ext.getCmp("editBizUserId") |
| | | // .setValue(data.bizUserId); |
| | | // Ext.getCmp("editBizUser") |
| | | // .setValue(data.bizUserName); |
| | | // Ext.getCmp("editBizUser") |
| | | // .setIdValue(data.bizUserId); |
| | | // } else { |
| | | // PSI.MsgBox.showInfo("网络错误") |
| | | // } |
| | | // } |
| | | // }); |
| | | // }, |
| | | |
| | | // private |
| | | onOK: function () { |
| | | var me = this; |
| | | //var pSOTs = window.opener.Ext.getMainGrid().getSelectionModel().getSelection(); |
| | | var f = Ext.getCmp("editForm"); |
| | | var el = f.getEl(); |
| | | el.mask(PSI.Const.SAVING); |
| | | f.submit({ |
| | | url: PSI.Const.BASE_URL + "Home/SaleTracking/setDeclareData", |
| | | Ext.getBody().mask(PSI.Const.SAVING); |
| | | Ext.Ajax.request({ |
| | | url: PSI.Const.BASE_URL + "Home/SaleTracking/setTrackingData", |
| | | method: "POST", |
| | | params:{ |
| | | "selectedSOTs": me.getSelectedSOTs() |
| | | "jsonStr": me.getSaveData() |
| | | }, |
| | | success: function (form, action) { |
| | | el.unmask(); |
| | | callback: function (options, success, response) { |
| | | Ext.getBody().unmask(); |
| | | |
| | | me.close(); |
| | | var pf = me.getParentForm(); |
| | | pf.refreshRvInfo(); |
| | | //pf.refreshselectedSOTsInfo(); |
| | | pf.getRvRecordGrid().getStore().loadPage(1); |
| | | }, |
| | | failure: function (form, action) { |
| | | el.unmask(); |
| | | PSI.MsgBox.showInfo(action.result.msg, function () { |
| | | //xt.getCmp("editBizDT").focus(); |
| | | }); |
| | | if (success) { |
| | | var data = Ext.JSON.decode(response.responseText); |
| | | if (data.success) { |
| | | PSI.MsgBox.showInfo("成功保存数据", function () { |
| | | me.close(); |
| | | me.getParentForm().refreshMainGrid(); |
| | | }); |
| | | } else { |
| | | var failedArr = data.msg.failed; |
| | | var showMsg = "成功:"+data.msg.success.length + "条,失败:" + failedArr.length + "条<br/>"; |
| | | failedArr.forEach(function(m,i,failedArr) { |
| | | showMsg = showMsg + m + "<br/>"; |
| | | }); |
| | | PSI.MsgBox.showInfo(showMsg); |
| | | me.close(); |
| | | me.getParentForm().refreshMainGrid(); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | getSaveData: function () { |
| | | var me = this; |
| | | var result = { |
| | | id: Ext.getCmp("hiddenId").getValue(), |
| | | dealDate: Ext.Date.format(Ext.getCmp("editDealDate").getValue(), |
| | | "Y-m-d"), |
| | | customerId: Ext.getCmp("editCustomer").getIdValue(), |
| | | dealAddress: Ext.getCmp("editDealAddress").getValue(), |
| | | contact: Ext.getCmp("editContact").getValue(), |
| | | tel: Ext.getCmp("editTel").getValue(), |
| | | fax: Ext.getCmp("editFax").getValue(), |
| | | orgId: Ext.getCmp("editOrg").getIdValue(), |
| | | bizUserId: Ext.getCmp("editBizUser").getIdValue(), |
| | | receivingType: Ext.getCmp("editReceivingType").getValue(), |
| | | billMemo: Ext.getCmp("editBillMemo").getValue(), |
| | | scbillRef: me.getScbillRef(), |
| | | items: [] |
| | | }; |
| | | |
| | | var store = this.getGoodsGrid().getStore(); |
| | | for (var i = 0; i < store.getCount(); i++) { |
| | | var item = store.getAt(i); |
| | | var store = me.getSelectedSOTs(); |
| | | for (var i = 0; i < store.length; i++) { |
| | | var item = store[i]; |
| | | result.items.push({ |
| | | id: item.get("id"), |
| | | goodsId: item.get("goodsId"), |
| | | goodsCount: item.get("goodsCount"), |
| | | goodsPrice: item.get("goodsPrice"), |
| | | goodsMoney: item.get("goodsMoney"), |
| | | tax: item.get("tax"), |
| | | taxRate: item.get("taxRate"), |
| | | moneyWithTax: item.get("moneyWithTax"), |
| | | memo: item.get("memo"), |
| | | scbillDetailId: item.get("scbillDetailId"), |
| | | goodsPriceWithTax: item.get("goodsPriceWithTax") |
| | | fid: Ext.getCmp("fid").getValue(), |
| | | time: Ext.Date.format(Ext.getCmp("time").getValue(),"Y-m-d"), |
| | | declareNo: Ext.getCmp("declareNo").getValue(), |
| | | soBillTackingId: item.data["sobill_tacking_id"], |
| | | soBillId: item.data["sobill_id"], |
| | | soBillDetailId: item.data["sobill_detail_id"], |
| | | wsBillId: item.data["wsbill_id"], |
| | | wsBillDetailId: item.data["wsbill_detail_id"], |
| | | goodsId: item.data["goods_id"], |
| | | soBillNo: item.data["sobill_no"], |
| | | goodName: item.data["good_name"] |
| | | }); |
| | | } |
| | | |
| | |
| | | items: [{ |
| | | region: "north", |
| | | height: "100%", |
| | | split: true, |
| | | split: false, |
| | | layout: "fit", |
| | | border: 0, |
| | | items: [me.getMainGrid()] |
| | |
| | | id: "buttonDeclare", |
| | | hidden: me.getPermission().declare == "0", |
| | | scope: me, |
| | | handler: me.onDeclare |
| | | handler: function(){ |
| | | me.onClickTracking("C001-01"); |
| | | }, |
| | | }, { |
| | | hidden: me.getPermission().declare == "0", |
| | | xtype: "tbseparator" |
| | |
| | | text: "检疫", |
| | | hidden: me.getPermission().quarantine == "0", |
| | | scope: me, |
| | | handler: me.onQuarantine, |
| | | handler: function(){ |
| | | me.onClickTracking("C001-02"); |
| | | }, |
| | | id: "buttonQuarantine" |
| | | }, { |
| | | hidden: me.getPermission().quarantine == "0", |
| | |
| | | text: "查验", |
| | | hidden: me.getPermission().check == "0", |
| | | scope: me, |
| | | handler: me.onCheck, |
| | | handler: function(){ |
| | | me.onClickTracking("C001-03"); |
| | | }, |
| | | id: "buttonCheck" |
| | | }, { |
| | | hidden: me.getPermission().check == "0", |
| | |
| | | text: "放行", |
| | | hidden: me.getPermission().release == "0", |
| | | scope: me, |
| | | handler: me.onRelease, |
| | | handler: function(){ |
| | | me.onClickTracking("C001-04"); |
| | | }, |
| | | id: "buttonRelease" |
| | | }, { |
| | | hidden: me.getPermission().release == "0", |
| | |
| | | text: "提货", |
| | | hidden: me.getPermission().pickUp == "0", |
| | | scope: me, |
| | | handler: me.onPickUp, |
| | | handler: function(){ |
| | | me.onClickTracking("C001-05"); |
| | | }, |
| | | id: "buttonPickUp" |
| | | }, { |
| | | hidden: me.getPermission().pickUp == "0", |
| | |
| | | text: "卸货", |
| | | hidden: me.getPermission().unload == "0", |
| | | scope: me, |
| | | handler: me.onUnload, |
| | | handler: function(){ |
| | | me.onClickTracking("C001-06"); |
| | | }, |
| | | id: "buttonUnload" |
| | | }, { |
| | | hidden: me.getPermission().unload == "0", |
| | |
| | | }); |
| | | store.on("load", function (e, records, successful) { |
| | | if (successful) { |
| | | me.gotoMainGridRecord(me.__lastId); |
| | | // me.gotoMainGridRecord(me.__lastId); |
| | | } |
| | | }); |
| | | |
| | | me.__mainGrid = Ext.create("Ext.grid.Panel", { |
| | | cls: "PSI", |
| | | selModel:Ext.create('Ext.selection.CheckboxModel',{mode:"SIMPLE"}), |
| | | //selModel:Ext.create('Ext.selection.CheckboxModel',{mode:"SIMPLE"}), |
| | | selModel : { |
| | | selType : 'checkboxmodel', |
| | | mode : 'SIMPLE', |
| | | checkOnly : true, |
| | | renderer : function(v,p,record) { |
| | | if (record.data.wsbill_detail_id) { |
| | | return '<div class="x-grid-row-checker"> </div>'; |
| | | }else{ |
| | | return ''; |
| | | } |
| | | } |
| | | }, |
| | | viewConfig: { |
| | | enableTextSelection: true, |
| | | }, |
| | |
| | | dataIndex: "customer_name", |
| | | align: "center", |
| | | width: 200, |
| | | menuDisabled: false, |
| | | sortable: true |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }, { |
| | | header: "销售合同号", |
| | | dataIndex: "scbill_no", |
| | |
| | | sortable: false |
| | | }, { |
| | | header: "报关", |
| | | menuDisabled: true, |
| | | sortable: false, |
| | | columns: [{ |
| | | header: "报关单号", |
| | | dataIndex: "declare_no", |
| | |
| | | }, { |
| | | header: "跟进人", |
| | | dataIndex: "declare_user_name", |
| | | width: 60, |
| | | width: 65, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }] |
| | | }, { |
| | | header: "检疫", |
| | | menuDisabled: true, |
| | | sortable: false, |
| | | columns: [{ |
| | | header: "日期", |
| | | dataIndex: "quarantine_time", |
| | |
| | | }, { |
| | | header: "跟进人", |
| | | dataIndex: "quarantine_user_name", |
| | | width: 60, |
| | | width: 65, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }] |
| | | }, { |
| | | header: "查验", |
| | | menuDisabled: true, |
| | | sortable: false, |
| | | columns: [{ |
| | | header: "日期", |
| | | dataIndex: "check_time", |
| | |
| | | }, { |
| | | header: "跟进人", |
| | | dataIndex: "check_user_name", |
| | | width: 60, |
| | | width: 65, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }] |
| | | }, { |
| | | header: "放行", |
| | | menuDisabled: true, |
| | | sortable: false, |
| | | columns: [{ |
| | | header: "日期", |
| | | dataIndex: "release_time", |
| | |
| | | }, { |
| | | header: "跟进人", |
| | | dataIndex: "release_user_name", |
| | | width: 60, |
| | | width: 65, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }] |
| | | }, { |
| | | header: "提货", |
| | | menuDisabled: true, |
| | | sortable: false, |
| | | columns: [{ |
| | | header: "日期", |
| | | dataIndex: "pick_up_time", |
| | |
| | | }, { |
| | | header: "跟进人", |
| | | dataIndex: "pick_up_user_name", |
| | | width: 60, |
| | | width: 65, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }] |
| | | }, { |
| | | header: "卸货", |
| | | menuDisabled: true, |
| | | sortable: false, |
| | | columns: [{ |
| | | header: "日期", |
| | | dataIndex: "upload_time", |
| | | dataIndex: "unload_time", |
| | | width: 90, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | | }, { |
| | | header: "跟进人", |
| | | dataIndex: "upload_user_name", |
| | | width: 60, |
| | | dataIndex: "unload_user_name", |
| | | width: 65, |
| | | align: "center", |
| | | menuDisabled: true, |
| | | sortable: false |
| | |
| | | selectionchange: { |
| | | fn: me.onMainGridSelect, |
| | | scope: me |
| | | }, |
| | | beforeselect: function(grid, record, index, eOpts) { |
| | | //console.info("|"+record.get('wsbill_detail_id')+"|"); |
| | | if (!record.get('wsbill_detail_id')) { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | |
| | | /** |
| | | * 报关 |
| | | */ |
| | | onDeclare: function () { |
| | | onClickTracking: function (vFid) { |
| | | var me = this; |
| | | var records = me.getMainGrid().getSelectionModel().getSelection(); |
| | | if (records.length == 0) { |
| | | me.showInfo("没有选择任何行,请选择数据行。"); |
| | | me.showInfo("没有选择任何行,请选择数据行。" + vFid); |
| | | return; |
| | | } |
| | | |
| | | |
| | | var form = Ext.create("PSI.SaleOrderTracking.EditForm", { |
| | | parentForm: me, |
| | | fid: "C001-01", |
| | | fid: vFid, |
| | | selectedSOTs: records |
| | | }); |
| | | form.show(); |