Просмотр исходного кода

提交类型 修改需求
提交内容
1.添加消息模块数据库两个字段,将数据库版本提高到89
2.修改采购单详情界面内容,现还有回复接口需要调节一下
3.修改通用单据详情界面,避免一场出现
4.修改消息模块相关内容,针对审批知会消息进行第三层处理

冲突文件 版本文件、ViewUtil 取网络

Bitliker 8 лет назад
Родитель
Сommit
1cd8310f63

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed Jan 17 17:15:10 CST 2018
-debugName=474
+#Thu Jan 18 15:27:21 CST 2018
+debugName=475
 versionName=624
-debugCode=474
+debugCode=475
 versionCode=163

+ 18 - 6
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/activity/PurchaseDetailsActivity.java

@@ -201,11 +201,11 @@ public class PurchaseDetailsActivity extends BaseNetActivity implements OnSmartH
             public void run() {
                 JSONObject object = JSON.parseObject(message);
                 final List<Purchase> dataList = new ArrayList<>();
-                dataList.add(getPurchase(object));
+                dataList.add(getPurchase(true, object));
                 JSONArray orderItems = JSONUtil.getJSONArray(object, "orderItems");
                 if (!ListUtils.isEmpty(orderItems)) {
                     for (int i = 0; i < orderItems.size(); i++) {
-                        dataList.add(getPurchase(orderItems.getJSONObject(i)));
+                        dataList.add(getPurchase(false, orderItems.getJSONObject(i)));
                     }
                 }
                 OAHttpHelper.getInstance().post(new Runnable() {
@@ -219,18 +219,30 @@ public class PurchaseDetailsActivity extends BaseNetActivity implements OnSmartH
     }
 
 
-    private Purchase getPurchase(JSONObject object) {
+    private Purchase getPurchase(boolean first, JSONObject object) {
         Purchase purchase = new Purchase();
         int id = JSONUtil.getInt(object, "id");
         String client = JSONUtil.getText(object, "receiveName");//客户
         String address = JSONUtil.getText(object, "shipAddress");//收货地址
-        String code = JSONUtil.getText(object, "code");//采购单号
         String time = DateFormatUtil.long2Str(JSONUtil.getLong(object, "erpDate", "date"), DateFormatUtil.YMD_HMS);//单据时间
-        String remarks = JSONUtil.getText(object, "remark");//备注
-        String alls = JSONUtil.getText(object, "amount");//总额
         String number = JSONUtil.getText(object, "qty");//数量
         String date = DateFormatUtil.long2Str(JSONUtil.getLong(object, "replyDelivery", "delivery"), DateFormatUtil.YMD);//交货日期
         String replyRemark = JSONUtil.getText(object, "replyRemark");//采购单号
+
+
+        String code;//采购单号
+        String remarks;//备注|产品
+        String alls ;//总额|产品规格
+        if (first) {
+            code = JSONUtil.getText(object, "code");//采购单号
+            remarks = JSONUtil.getText(object, "remark");//备注
+            alls = JSONUtil.getText(object, "amount");//总额
+        } else {
+            JSONObject product = JSONUtil.getJSONObject(object, "product");
+            code = JSONUtil.getText(product, "cmpCode");
+            remarks = JSONUtil.getText(product, "title");
+            alls = JSONUtil.getText(product, "spec");
+        }
         purchase.setId(id);
         purchase.setCode(code);
         purchase.setCustomer(client);

+ 1 - 1
app_modular/appworks/src/main/java/com/uas/appworks/OA/platform/adapter/PurchaseDetailsAdapter.java

@@ -166,7 +166,7 @@ public class PurchaseDetailsAdapter extends RecyclerView.Adapter<RecyclerView.Vi
         Purchase purchase = purchases.get(position);
         holder.totalTv.setText(purchase.getTotal());
         holder.remarksTv.setText(purchase.getRemarks());
-        holder.timeTv.setText(purchase.getTime());
+        holder.timeTv.setText(purchase.getCode());
         holder.dateEd.setText(purchase.getDate());
         holder.numberEd.setText(purchase.getNumber());
         holder.remarksInputEd.setText(purchase.getRemarksInput());

+ 3 - 3
app_modular/appworks/src/main/res/layout/item_purchase.xml

@@ -9,7 +9,7 @@
         android:id="@+id/timeTag"
         android:layout_width="80dp"
         android:layout_height="wrap_content"
-        android:text="单据时间:"
+        android:text="编号:"
         android:textColor="@color/hintColor"
         android:textSize="@dimen/text_main" />
 
@@ -29,7 +29,7 @@
         android:layout_height="wrap_content"
         android:layout_below="@id/timeTag"
         android:layout_marginTop="@dimen/padding"
-        android:text="备注:"
+        android:text="产品:"
         android:textColor="@color/hintColor"
         android:textSize="@dimen/text_main" />
 
@@ -49,7 +49,7 @@
         android:layout_height="wrap_content"
         android:layout_below="@id/remarksTag"
         android:layout_marginTop="@dimen/padding"
-        android:text="总额:"
+        android:text="规格型号:"
         android:textColor="@color/hintColor"
         android:textSize="@dimen/text_main" />