提交 7ef0710f authored 作者: lgd's avatar lgd

1.mes审核,差两个产品关联

2.//TODO ,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,mes质量反馈,编辑任务担当无法修改.
上级 0ddfe742
...@@ -1708,8 +1708,14 @@ ...@@ -1708,8 +1708,14 @@
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
WorkOrderActivity android:name=".ui.activity.mes.quality.MesChooseMangerActivity"
android:configChanges="keyboardHidden|orientation"
android:label=" "
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.bean.mesBean; package com.wd.workoffice.bean.mesBean;
import java.util.List;
/** /**
* author : flexible * author : flexible
* email : lgd19940421@163.com * email : lgd19940421@163.com
...@@ -128,23 +130,23 @@ public class FeedbackDetailBean { ...@@ -128,23 +130,23 @@ public class FeedbackDetailBean {
private Object defectMudId; private Object defectMudId;
private Object defectMudCode; private Object defectMudCode;
private String defectMudName; private String defectMudName;
private Object rapidResponse; private String rapidResponse;
private Object customerResponse; private String customerResponse;
private Object relatedRecord; private String relatedRecord;
private Object seriesName; private Object seriesName;
private Object seriesType; private Object seriesType;
private Object severity; private Object severity;
private String treatRectPlan; private String treatRectPlan;
private String status; private String status;
private Object attachments; private List<ImageBean> attachments;
private Object responsibleUserId; private Object responsibleUserId;
private Object responsibleUserName; private String responsibleUserName;
private String factoryTreatmentDateTime; private String factoryTreatmentDateTime;
private Object verifyUserId; private Object verifyUserId;
private Object verifyUserName; private String verifyUserName;
private Object verifyUserDate; private Object verifyUserDate;
private Object recordUserId; private Object recordUserId;
private Object recorUserName; private String recorUserName;
private Object recorUserDate; private Object recorUserDate;
private Object responsibleDealId; private Object responsibleDealId;
private String responsibleDealName; private String responsibleDealName;
...@@ -499,27 +501,27 @@ public class FeedbackDetailBean { ...@@ -499,27 +501,27 @@ public class FeedbackDetailBean {
this.defectMudName = defectMudName; this.defectMudName = defectMudName;
} }
public Object getRapidResponse() { public String getRapidResponse() {
return rapidResponse; return rapidResponse;
} }
public void setRapidResponse(Object rapidResponse) { public void setRapidResponse(String rapidResponse) {
this.rapidResponse = rapidResponse; this.rapidResponse = rapidResponse;
} }
public Object getCustomerResponse() { public String getCustomerResponse() {
return customerResponse; return customerResponse;
} }
public void setCustomerResponse(Object customerResponse) { public void setCustomerResponse(String customerResponse) {
this.customerResponse = customerResponse; this.customerResponse = customerResponse;
} }
public Object getRelatedRecord() { public String getRelatedRecord() {
return relatedRecord; return relatedRecord;
} }
public void setRelatedRecord(Object relatedRecord) { public void setRelatedRecord(String relatedRecord) {
this.relatedRecord = relatedRecord; this.relatedRecord = relatedRecord;
} }
...@@ -563,11 +565,11 @@ public class FeedbackDetailBean { ...@@ -563,11 +565,11 @@ public class FeedbackDetailBean {
this.status = status; this.status = status;
} }
public Object getAttachments() { public List<ImageBean> getAttachments() {
return attachments; return attachments;
} }
public void setAttachments(Object attachments) { public void setAttachments( List<ImageBean> attachments) {
this.attachments = attachments; this.attachments = attachments;
} }
...@@ -579,11 +581,11 @@ public class FeedbackDetailBean { ...@@ -579,11 +581,11 @@ public class FeedbackDetailBean {
this.responsibleUserId = responsibleUserId; this.responsibleUserId = responsibleUserId;
} }
public Object getResponsibleUserName() { public String getResponsibleUserName() {
return responsibleUserName; return responsibleUserName;
} }
public void setResponsibleUserName(Object responsibleUserName) { public void setResponsibleUserName(String responsibleUserName) {
this.responsibleUserName = responsibleUserName; this.responsibleUserName = responsibleUserName;
} }
...@@ -603,11 +605,11 @@ public class FeedbackDetailBean { ...@@ -603,11 +605,11 @@ public class FeedbackDetailBean {
this.verifyUserId = verifyUserId; this.verifyUserId = verifyUserId;
} }
public Object getVerifyUserName() { public String getVerifyUserName() {
return verifyUserName; return verifyUserName;
} }
public void setVerifyUserName(Object verifyUserName) { public void setVerifyUserName(String verifyUserName) {
this.verifyUserName = verifyUserName; this.verifyUserName = verifyUserName;
} }
...@@ -627,11 +629,11 @@ public class FeedbackDetailBean { ...@@ -627,11 +629,11 @@ public class FeedbackDetailBean {
this.recordUserId = recordUserId; this.recordUserId = recordUserId;
} }
public Object getRecorUserName() { public String getRecorUserName() {
return recorUserName; return recorUserName;
} }
public void setRecorUserName(Object recorUserName) { public void setRecorUserName(String recorUserName) {
this.recorUserName = recorUserName; this.recorUserName = recorUserName;
} }
......
...@@ -325,7 +325,15 @@ public interface MesApiService { ...@@ -325,7 +325,15 @@ public interface MesApiService {
* *
* @return * @return
*/ */
@GET("/himes/api/feedback/deal/update.json") @POST("/himes/api/feedback/deal/update.json")
Observable<BaseMesBean> feedbackCheck( @Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> feedbackCheck( @Query("functionId") String functionId, @Body RequestBody requestBody);
/**
* 销售经理查询
*
* @return
*/
@POST("/himes/api/user/show/page.json")
Observable<BaseMesBean> managerList( @Query("functionId") String functionId, @Body RequestBody requestBody);
} }
package com.wd.workoffice.ui.activity.mes.quality;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.MesClientAdapter;
import com.wd.workoffice.ui.adapter.MesManagerAdapter;
import com.wd.workoffice.util.WorkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 销售经理查询
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesChooseMangerActivity extends WorkToolBarActivity {
@BindView(R.id.et_key)
EditText etKey;
@BindView(R.id.btn_search)
Button btnSearch;
@BindView(R.id.rv_client)
RecyclerView rvClient;
private Map<String, Object> param;
private List<ManagerUserBean.ListBean> clientList;
private MesManagerAdapter clientAdapter;
private int page = 1;
@Override
protected void initView() {
ButterKnife.bind(this);
rvClient.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
clientList = new ArrayList<>();
clientAdapter = new MesManagerAdapter(R.layout.item_store_client, clientList);
clientAdapter.bindToRecyclerView(rvClient);
clientAdapter.setEmptyView(R.layout.view_empty_content, rvClient);
param = WorkUtils.pageMesKey();
param.put("pageNum", 1);
getData();
}
private void getData() {
RtfUtils.getMesRtf().managerList("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
List<ManagerUserBean.ListBean> getList = JSON.parseObject(data.getData().toString(), ManagerUserBean.class).getList();
if (page == 1) {
clientList.clear();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
clientAdapter.loadMoreComplete();
} else {
clientAdapter.loadMoreComplete();
clientList.addAll(getList);
clientAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
clientAdapter.loadMoreEnd();
} else {
page++;
}
toast("搜索成功");
}
});
}
@Override
protected void initEvent() {
clientAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
param.put("pageNum", page);
getData();
}
}, rvClient);
clientAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
Intent intent = new Intent();
intent.putExtra("data", JSON.toJSONString(clientList.get(position)));
setResult(10001, intent);
finish();
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_mes_ticket_take_on;
}
@OnClick(R.id.btn_search)
public void onViewClicked() {
param.put("name", etKey.getText().toString());
param.put("pageNum", 1);
page = 1;
getData();
}
}
package com.wd.workoffice.ui.activity.mes.quality; package com.wd.workoffice.ui.activity.mes.quality;
import android.os.Bundle;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
...@@ -14,6 +13,7 @@ import com.scwang.smartrefresh.layout.listener.OnRefreshListener; ...@@ -14,6 +13,7 @@ import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.bean.mesBean.FeedbackBean; import com.wd.workoffice.bean.mesBean.FeedbackBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
...@@ -21,6 +21,9 @@ import com.wd.workoffice.ui.activity.mes.ticket.MesTicketConditionActivity; ...@@ -21,6 +21,9 @@ import com.wd.workoffice.ui.activity.mes.ticket.MesTicketConditionActivity;
import com.wd.workoffice.ui.adapter.MesQualityAdapter; import com.wd.workoffice.ui.adapter.MesQualityAdapter;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -160,5 +163,25 @@ public class MesQualityActivity extends WorkToolBarActivity { ...@@ -160,5 +163,25 @@ public class MesQualityActivity extends WorkToolBarActivity {
@OnClick(R.id.btn_add) @OnClick(R.id.btn_add)
public void onViewClicked() { public void onViewClicked() {
startActivity(MesQualityAddActivity.class);
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckFeedbackEvent event) {
page = 1;
param.put("pageNum", page);
getData();
} }
} }
package com.wd.workoffice.ui.activity.mes.quality; package com.wd.workoffice.ui.activity.mes.quality;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProPriceBean; import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.ui.adapter.MesQualityAdapter; import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/** /**
* author : flexible * author : flexible
...@@ -17,11 +40,18 @@ import butterknife.ButterKnife; ...@@ -17,11 +40,18 @@ import butterknife.ButterKnife;
**/ **/
public class MesQualityClientActivity extends WorkToolBarActivity { public class MesQualityClientActivity extends WorkToolBarActivity {
private Map<String, Object> param;
private List<ProPriceBean.RecordsBean> dataList;
private MesQualityAdapter dataAdapter;
private int page = 1;
@BindView(R.id.tv_client_status)
EditText tvClientStatus;
@BindView(R.id.tv_client_reply)
EditText tvClientReply;
@BindView(R.id.tv_client_record)
EditText tvClientRecord;
@BindView(R.id.tv_client_person)
TextView tvClientPerson;
@BindView(R.id.rl_client_person)
RelativeLayout rlClientPerson;
private Map<String, Object> param;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
...@@ -30,51 +60,57 @@ public class MesQualityClientActivity extends WorkToolBarActivity { ...@@ -30,51 +60,57 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
// getData(); param = WorkUtils.simpleParam();
FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class);
param.put("id",data.getId());
param.put("status",3);
} }
// private void getData() { private void submit() {
// RtfUtils.getRtf().getProHistoryPrice(param).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { param.put("rapidResponse",tvClientStatus.getText().toString());
// @Override param.put("customerResponse",tvClientReply.getText().toString());
// public void doOnSubscribe(Disposable d) { param.put("relatedRecord",tvClientRecord.getText().toString());
// }
// RtfUtils.getMesRtf().feedbackCheck("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
// @Override @Override
// public void onFail(String errorMsg) { public void doOnSubscribe(Disposable d) {
// hideLoading(); }
// toast(errorMsg);
// }
//
// @Override
// public void onSuccess(BaseBean data) {
// hideLoading();
// if (data.getCode() != 0) {
// toast(data.getMsg());
// return;
// }
// List<ProPriceBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), ProPriceBean.class).getRecords();
//
// if (page == 1) {
// srlRefresh.finishRefresh();
// dataList.clear();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// dataAdapter.loadMoreComplete();
// } else {
// dataAdapter.loadMoreComplete();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// dataAdapter.loadMoreEnd();
// } else {
// page++;
// }
// }
// });
// }
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
EventBus.getDefault().post(new CheckFeedbackEvent());
toast("审核成功");
finish();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
@Override @Override
protected void initEvent() { protected void initEvent() {
} }
...@@ -85,4 +121,24 @@ public class MesQualityClientActivity extends WorkToolBarActivity { ...@@ -85,4 +121,24 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
} }
@OnClick(R.id.rl_client_person)
public void onViewClicked() {
startActivityForResult(MesChooseMangerActivity.class,10001);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
ManagerUserBean.ListBean manager = JSON.parseObject(data.getStringExtra("data"), ManagerUserBean.ListBean.class);
param.put("recordUserId",manager.getId());
param.put("recorUserName",manager.getName());
tvClientPerson.setText(manager.getName());
}
break;
}
}
} }
...@@ -10,10 +10,21 @@ import com.alibaba.fastjson.JSON; ...@@ -10,10 +10,21 @@ import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean; import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.event.AddTicketEvent;
import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.bean.mesBean.FeedbackDetailBean; import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.adapter.ImgAdapter;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
...@@ -101,16 +112,21 @@ public class MesQualityDetailActivity extends WorkToolBarActivity { ...@@ -101,16 +112,21 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
@BindView(R.id.ll_client) @BindView(R.id.ll_client)
LinearLayout llClient; LinearLayout llClient;
private FeedbackDetailBean detailBean; private FeedbackDetailBean detailBean;
private List<ImageBean> imgList;
private ImgAdapter imgAdapter;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
llBottom.setVisibility(View.VISIBLE); rvImg.setLayoutManager(new GridLayoutManager(this, 3, RecyclerView.VERTICAL, false));
} }
@Override @Override
protected void initData() { protected void initData() {
imgList = new ArrayList<>();
imgAdapter = new ImgAdapter(R.layout.item_mes_ticket_img, imgList);
imgAdapter.bindToRecyclerView(rvImg);
detail(); detail();
} }
...@@ -140,6 +156,9 @@ public class MesQualityDetailActivity extends WorkToolBarActivity { ...@@ -140,6 +156,9 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
} }
private void changeView() { private void changeView() {
imgList.clear();
imgList.addAll(detailBean.getAttachments());
imgAdapter.notifyDataSetChanged();
switch (detailBean.getStatus()) { switch (detailBean.getStatus()) {
case "0": case "0":
llClient.setVisibility(View.GONE); llClient.setVisibility(View.GONE);
...@@ -154,8 +173,8 @@ public class MesQualityDetailActivity extends WorkToolBarActivity { ...@@ -154,8 +173,8 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
llBottom.setVisibility(View.VISIBLE); llBottom.setVisibility(View.VISIBLE);
break; break;
case "2": case "2":
llClient.setVisibility(View.VISIBLE); llClient.setVisibility(View.GONE);
llCompany.setVisibility(View.GONE); llCompany.setVisibility(View.VISIBLE);
llManager.setVisibility(View.VISIBLE); llManager.setVisibility(View.VISIBLE);
llBottom.setVisibility(View.VISIBLE); llBottom.setVisibility(View.VISIBLE);
break; break;
...@@ -196,15 +215,15 @@ public class MesQualityDetailActivity extends WorkToolBarActivity { ...@@ -196,15 +215,15 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
tvFactoryStatus.setText(detailBean.getFactoryImplement()); tvFactoryStatus.setText(detailBean.getFactoryImplement());
tvFactorySuggest.setText(detailBean.getFactoryLeaderOpinion()); tvFactorySuggest.setText(detailBean.getFactoryLeaderOpinion());
tvProcess.setText(detailBean.getTreatRectPlan()); tvProcess.setText(detailBean.getTreatRectPlan());
tvDutyPerson.setText(detailBean.getResponsibleDealName()); tvDutyPerson.setText(detailBean.getResponsibleUserName());
tvVerifyPerson.setText(detailBean.getApprovalUserName()); tvVerifyPerson.setText(detailBean.getVerifyUserName());
tvQuestion.setText(detailBean.getDefectMudName()); tvQuestion.setText(detailBean.getDefectMudName());
tvTime.setText(detailBean.getFactoryTreatmentDateTime()); tvTime.setText(detailBean.getFactoryTreatmentDateTime());
//四、客户回馈信息 //四、客户回馈信息
tvClientStatus.setText(detailBean.getApprovalUserName()); tvClientStatus.setText(detailBean.getRapidResponse());
tvClientReply.setText(detailBean.getDefectMudName()); tvClientReply.setText(detailBean.getCustomerResponse());
tvClientRecord.setText(detailBean.getFactoryTreatmentDateTime()); tvClientRecord.setText(detailBean.getRelatedRecord());
tvClientPerson.setText(detailBean.getFactoryTreatmentDateTime()); tvClientPerson.setText(detailBean.getRecorUserName());
} }
@Override @Override
...@@ -219,8 +238,7 @@ public class MesQualityDetailActivity extends WorkToolBarActivity { ...@@ -219,8 +238,7 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
@OnClick(R.id.btn_reviews) @OnClick(R.id.btn_reviews)
public void onViewClicked() { public void onViewClicked() {
// switch (detailBean.getStatus()) { switch (detailBean.getStatus()) {
switch ("0") {
case "0": case "0":
startActivity(MesQualityManagerActivity.class,"data",JSON.toJSONString(detailBean)); startActivity(MesQualityManagerActivity.class,"data",JSON.toJSONString(detailBean));
break; break;
...@@ -232,4 +250,20 @@ public class MesQualityDetailActivity extends WorkToolBarActivity { ...@@ -232,4 +250,20 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
break; break;
} }
} }
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Subscribe
public void refresh(CheckFeedbackEvent event) {
finish();
}
} }
package com.wd.workoffice.ui.activity.mes.quality; package com.wd.workoffice.ui.activity.mes.quality;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.bigkoo.pickerview.listener.OnTimeSelectListener;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProPriceBean; import com.wd.workoffice.bean.event.CheckFeedbackEvent;
import com.wd.workoffice.ui.adapter.MesQualityAdapter; import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import com.wd.workoffice.bean.mesBean.ImageBean;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.PickTimeUtils;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable;
import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import flexible.xd.android_base.utils.TimeUtils;
import io.reactivex.disposables.Disposable;
/** /**
* author : flexible * author : flexible
...@@ -17,11 +48,34 @@ import butterknife.ButterKnife; ...@@ -17,11 +48,34 @@ import butterknife.ButterKnife;
**/ **/
public class MesQualityFactoryActivity extends WorkToolBarActivity { public class MesQualityFactoryActivity extends WorkToolBarActivity {
private Map<String, Object> param;
private List<ProPriceBean.RecordsBean> dataList;
private MesQualityAdapter dataAdapter;
private int page = 1;
@BindView(R.id.tv_factory_reason)
EditText tvFactoryReason;
@BindView(R.id.tv_factory_suggest)
EditText tvFactorySuggest;
@BindView(R.id.tv_factory_status)
EditText tvFactoryStatus;
@BindView(R.id.tv_process)
TextView tvProcess;
@BindView(R.id.rl_process)
RelativeLayout rlProcess;
@BindView(R.id.tv_duty_person)
TextView tvDutyPerson;
@BindView(R.id.rl_duty_person)
RelativeLayout rlDutyPerson;
@BindView(R.id.tv_verify_person)
TextView tvVerifyPerson;
@BindView(R.id.rl_verify_person)
RelativeLayout rlVerifyPerson;
@BindView(R.id.tv_question)
TextView tvQuestion;
@BindView(R.id.rl_question)
RelativeLayout rlQuestion;
@BindView(R.id.tv_time)
TextView tvTime;
@BindView(R.id.rl_time)
RelativeLayout rlTime;
private Map<String, Object> param;
@Override @Override
protected void initView() { protected void initView() {
ButterKnife.bind(this); ButterKnife.bind(this);
...@@ -30,51 +84,48 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity { ...@@ -30,51 +84,48 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
@Override @Override
protected void initData() { protected void initData() {
// getData(); param = WorkUtils.simpleParam();
FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class);
param.put("id",data.getId());
param.put("status",2);
} }
// private void getData() { private void submit() {
// RtfUtils.getRtf().getProHistoryPrice(param).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { // tvProcess.setText(detailBean.getTreatRectPlan());
// @Override // tvDutyPerson.setText(detailBean.getResponsibleDealName());
// public void doOnSubscribe(Disposable d) { // tvVerifyPerson.setText(detailBean.getApprovalUserName());
// } // tvQuestion.setText(detailBean.getDefectMudName());
// // tvTime.setText(detailBean.getFactoryTreatmentDateTime());
// @Override param.put("factoryAnalysis",tvFactoryReason.getText().toString());
// public void onFail(String errorMsg) { param.put("factoryImplement",tvFactoryStatus.getText().toString());
// hideLoading(); param.put("factoryLeaderOpinion",tvFactorySuggest.getText().toString());
// toast(errorMsg);
// }
//
// @Override
// public void onSuccess(BaseBean data) {
// hideLoading();
// if (data.getCode() != 0) {
// toast(data.getMsg());
// return;
// }
// List<ProPriceBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), ProPriceBean.class).getRecords();
//
// if (page == 1) {
// srlRefresh.finishRefresh();
// dataList.clear();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// dataAdapter.loadMoreComplete();
// } else {
// dataAdapter.loadMoreComplete();
// dataList.addAll(getList);
// dataAdapter.notifyDataSetChanged();
// }
// if (getList.size() == 0) {
// dataAdapter.loadMoreEnd();
// } else {
// page++;
// }
// }
// });
// }
RtfUtils.getMesRtf().feedbackCheck("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMsg());
return;
}
EventBus.getDefault().post(new CheckFeedbackEvent());
toast("审核成功");
finish();
}
});
}
@Override @Override
protected void initEvent() { protected void initEvent() {
} }
...@@ -84,5 +135,66 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity { ...@@ -84,5 +135,66 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
return R.layout.activity_mes_quality_factory; return R.layout.activity_mes_quality_factory;
} }
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_finish, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.finish:
submit();
break;
}
return super.onOptionsItemSelected(item);
}
@OnClick({R.id.rl_process, R.id.rl_duty_person, R.id.rl_verify_person, R.id.rl_question, R.id.rl_time})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.rl_process:
break;
case R.id.rl_duty_person:
startActivityForResult(MesChooseMangerActivity.class,10001);
break;
case R.id.rl_verify_person:
startActivityForResult(MesChooseMangerActivity.class,10002);
break;
case R.id.rl_question:
break;
case R.id.rl_time:
PickTimeUtils.showPickThree(this, new OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {
tvTime.setText(TimeUtils.date2String(date,new SimpleDateFormat("yyyy-MM-dd")));
param.put("factoryTreatmentDateTime",TimeUtils.date2String(date,new SimpleDateFormat("yyyy-MM-dd")));
}
}).show();
break;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case 10001:
if (resultCode == 10001) {
ManagerUserBean.ListBean manager = JSON.parseObject(data.getStringExtra("data"), ManagerUserBean.ListBean.class);
param.put("responsibleUserId",manager.getId());
param.put("responsibleUserName",manager.getName());
tvDutyPerson.setText(manager.getName());
}
break;
case 10002:
if (resultCode == 10001) {
ManagerUserBean.ListBean manager = JSON.parseObject(data.getStringExtra("data"), ManagerUserBean.ListBean.class);
param.put("verifyUserId",manager.getId());
param.put("verifyUserName",manager.getName());
tvVerifyPerson.setText(manager.getName());
}
break;
}
}
} }
...@@ -82,7 +82,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity { ...@@ -82,7 +82,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
protected void initData() { protected void initData() {
param = WorkUtils.simpleParam(); param = WorkUtils.simpleParam();
FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class); FeedbackDetailBean data = JSON.parseObject(getIntent().getStringExtra("data"), FeedbackDetailBean.class);
// param.put("id",data.getId()); param.put("id",data.getId());
param.put("status",1); param.put("status",1);
imgList=new ArrayList<>(); imgList=new ArrayList<>();
ImageBean imageBean = new ImageBean(); ImageBean imageBean = new ImageBean();
...@@ -121,6 +121,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity { ...@@ -121,6 +121,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
} }
EventBus.getDefault().post(new CheckFeedbackEvent()); EventBus.getDefault().post(new CheckFeedbackEvent());
toast("审核成功"); toast("审核成功");
finish();
} }
}); });
} }
......
...@@ -306,6 +306,11 @@ public class MesTicketAddSummaryActivity extends WorkToolBarActivity { ...@@ -306,6 +306,11 @@ public class MesTicketAddSummaryActivity extends WorkToolBarActivity {
} }
} }
param.put("completionSituation", etClient.getText().toString()); param.put("completionSituation", etClient.getText().toString());
List<ImageBean> uploadImg =new ArrayList<>();
for (int i = 0; i < imgList.size()-1; i++) {
uploadImg.add(imgList.get(i));
}
param.put("attachments",uploadImg);
RtfUtils.getMesRtf().summaryAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() { RtfUtils.getMesRtf().summaryAdd("1", "1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
......
...@@ -166,35 +166,6 @@ public class MesTicketDetailActivity extends WorkToolBarActivity { ...@@ -166,35 +166,6 @@ public class MesTicketDetailActivity extends WorkToolBarActivity {
param.put("jobUserId", data.getJobUserId()); param.put("jobUserId", data.getJobUserId());
} }
private void getData() {
RtfUtils.getRtf().getAccount().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseBean data) {
hideLoading();
if (data.getCode() != 0) {
toast(data.getMessage());
return;
}
dataBean = JSON.parseObject(data.getData().toString(), AccountBean.class);
// tvName.setText(dataBean.getName());
// tvDpeName.setText(dataBean.getName());
// tvDpePrice.setText(MathUtils.converData(dataBean.getBalance(), 2));
// tvDpeFreezePrice.setText(String.valueOf(dataBean.getFrozenAmount()));
}
});
}
@Override @Override
protected void initEvent() { protected void initEvent() {
......
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.ManagerUserBean;
import com.wd.workoffice.bean.mesBean.MesClientBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class MesManagerAdapter extends BaseQuickAdapter<ManagerUserBean.ListBean, BaseViewHolder> {
public MesManagerAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, ManagerUserBean.ListBean item) {
helper.setText(R.id.tv_name, item.getName());
}
}
...@@ -23,7 +23,7 @@ public class MesQualityAdapter extends BaseQuickAdapter<FeedbackBean.ListBean, B ...@@ -23,7 +23,7 @@ public class MesQualityAdapter extends BaseQuickAdapter<FeedbackBean.ListBean, B
@Override @Override
protected void convert(BaseViewHolder helper, FeedbackBean.ListBean item) { protected void convert(BaseViewHolder helper, FeedbackBean.ListBean item) {
helper.setText(R.id.tv_no, item.getFeedbackCode()); helper.setText(R.id.tv_no, item.getFeedbackCode());
helper.setText(R.id.tv_manager, item.getId()); helper.setText(R.id.tv_manager, item.getSaleUserName());
helper.setText(R.id.tv_name, item.getCustomerName()); helper.setText(R.id.tv_name, item.getCustomerName());
helper.setText(R.id.tv_phone, item.getPhoneNumber()); helper.setText(R.id.tv_phone, item.getPhoneNumber());
helper.setText(R.id.tv_pro, item.getProductName()); helper.setText(R.id.tv_pro, item.getProductName());
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_client_status"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm" android:layout_marginHorizontal="20mm"
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_client_reply"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm" android:layout_marginHorizontal="20mm"
...@@ -76,6 +78,7 @@ ...@@ -76,6 +78,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_client_record"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm" android:layout_marginHorizontal="20mm"
...@@ -90,6 +93,7 @@ ...@@ -90,6 +93,7 @@
<RelativeLayout <RelativeLayout
android:id="@+id/rl_client_person"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
...@@ -110,6 +114,7 @@ ...@@ -110,6 +114,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_client_person"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_factory_reason"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm" android:layout_marginHorizontal="20mm"
...@@ -55,6 +56,7 @@ ...@@ -55,6 +56,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_factory_suggest"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm" android:layout_marginHorizontal="20mm"
...@@ -76,6 +78,7 @@ ...@@ -76,6 +78,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<EditText <EditText
android:id="@+id/tv_factory_status"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="20mm" android:layout_marginHorizontal="20mm"
...@@ -88,6 +91,7 @@ ...@@ -88,6 +91,7 @@
android:textSize="14sp" /> android:textSize="14sp" />
<RelativeLayout <RelativeLayout
android:id="@+id/rl_process"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
...@@ -108,6 +112,7 @@ ...@@ -108,6 +112,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_process"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -125,6 +130,7 @@ ...@@ -125,6 +130,7 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_duty_person"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
...@@ -145,6 +151,7 @@ ...@@ -145,6 +151,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_duty_person"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -162,6 +169,7 @@ ...@@ -162,6 +169,7 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_verify_person"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
...@@ -182,6 +190,7 @@ ...@@ -182,6 +190,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_verify_person"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -199,6 +208,7 @@ ...@@ -199,6 +208,7 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_question"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
...@@ -219,6 +229,7 @@ ...@@ -219,6 +229,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_question"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -236,6 +247,7 @@ ...@@ -236,6 +247,7 @@
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/rl_time"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="20mm" android:paddingHorizontal="20mm"
...@@ -256,6 +268,7 @@ ...@@ -256,6 +268,7 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论