diff --git a/src/views/qm/products_form.vue b/src/views/qm/products_form.vue
index 53942f09..1fd599ac 100644
--- a/src/views/qm/products_form.vue
+++ b/src/views/qm/products_form.vue
@@ -558,22 +558,49 @@ export default {
}
this.form.count_ok = this.form.count - this.form.count_notok;
},
+ compare(name){
+ return function(a,b){
+ let value1 = a[name];
+ let value2 = b[name];
+ return value2 - value1
+ }
+ },
//获取物料批次
getMaterialBatch() {
let that = this;
let obj = {page: 0, count__gte: 0, count_xtest__gte: 0};
if(that.mode == "sizeAdd"||that.mode == "sizeEdit"||that.mode == "sizeShow"){
console.log('sizeAdd')
- obj.material__process__name = '一次超洗'
+ that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
+ if(res.length>0){
+ obj.belong_dept=res[0].id;
+ that.getMaterials(obj);
+ }
+ })
+ // obj.material__process__name = '一次超洗'
}else {
console.log('facadeAdd')
- obj.material__process__name = '二次超洗'
+ // obj.material__process__name = '二次超洗'
+ that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
+ if(res.length>0){
+ obj.belong_dept=res[0].id;
+ that.getMaterials(obj);
+ }
+ })
}
- that.$API.wpm.wmaterial.list
- .req(obj)
- .then((res) => {
- that.options = res;
- });
+ // that.$API.wpm.wmaterial.list.req(obj).then((res) => {
+ // res.sort(that.compare("count"));
+ // console.log('res',res)
+ // that.options = res;
+ // });
+ },
+ getMaterials(obj){
+ let that = this;
+ that.$API.wpm.wmaterial.list.req(obj).then((res) => {
+ res.sort(that.compare("count"));
+ console.log('res',res)
+ that.options = res;
+ });
},
handleChange(val) {
let that = this;
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index 675e0371..73fc51e5 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -116,13 +116,14 @@
-
+
+
@@ -153,6 +155,7 @@
controls-position="right"
:min="0"
step="1"
+ :disabled="mode==='show'"
:step-strictly="true"
style="width: 100%"
placeholder="交接数量"
@@ -160,7 +163,7 @@
-
+
@@ -483,6 +486,7 @@ export default {
//表单注入数据
setData(data) {
Object.assign(this.form, data);
+ console.log('this.form',this.form);
if(data.type==30){
this.getUserList3();
}else{