mushencc 3 vuotta sitten
vanhempi
commit
50e83786ee

+ 15 - 11
src/views/BasicSettings/SuppliersManage/SippliersListEdit.vue

@@ -49,7 +49,7 @@
           />
           <!-- :disabled="$route.query.type==2" -->
         </FormItem>
-        <FormItem label="供应商联系人:" prop="contact">
+        <FormItem label="供应商联系人:">
           <Input
             v-model="formData.contact"
             style="width:200px"
@@ -63,14 +63,14 @@
             placeholder="请输入供应商名称"
           />
         </FormItem>
-        <FormItem label="联系人手机号:" prop="mobile">
+        <FormItem label="联系人手机号:">
           <Input
             v-model="formData.mobile"
             style="width:200px"
             placeholder="请输入联系人手机号"
           />
         </FormItem>
-        <FormItem label="地区:" prop="area">
+        <FormItem label="地区:">
           <Tooltip :content="formData.area" placement="top">
             <Input
               v-model="formData.area"
@@ -90,7 +90,7 @@
             <Option :value="0">停用</Option>
           </Select>
         </FormItem>
-        <FormItem label="地址:" prop="address">
+        <FormItem label="地址:">
           <Input
             v-model="formData.address"
             style="width:200px"
@@ -158,8 +158,8 @@ export default {
           { required: true, message: "请填写供应商编码", trigger: "blur" },
         ],
         title: [{ required: true, message: "请填写名称", trigger: "blur" }],
-        mobile: [{ required: true, message: "请填写手机号", trigger: "blur" }],
-        contact: [{ required: true, message: "请填写联系人", trigger: "blur" }],
+        // mobile: [{ required: true, message: "请填写手机号", trigger: "blur" }],
+        // contact: [{ required: true, message: "请填写联系人", trigger: "blur" }],
         // user: [{ required: true, message: '请选择业务员', trigger: 'change' }],
         state: [
           {
@@ -168,9 +168,7 @@ export default {
             message: "请选择是否启用",
             trigger: "change",
           },
-        ],
-        area: [{ required: true, message: "请选择地区", trigger: "change" }],
-        address: [{ required: true, message: "请填写地址", trigger: "blur" }],
+        ]
       },
       salesmanList: [],
       tempAreaTitle: "",
@@ -267,8 +265,11 @@ export default {
                 },
               })
                 .then((res) => {
-                  this.$Message.success(res.msg);
+                  if(res.code == 200){
+                     this.$Message.success(res.msg);
                   this.goBack();
+                  }
+                 
                 })
                 .catch((err) => {})
             : this.axios({
@@ -279,8 +280,11 @@ export default {
                 },
               })
                 .then((res) => {
-                  this.$Message.success(res.msg);
+                  if(res.code == 200){
+                      this.$Message.success(res.msg);
                   this.goBack();
+                  }
+                
                 })
                 .catch((err) => {});
         } else {

+ 55 - 123
src/views/ProductionOrderList/Dispatchlist/confirm.vue

@@ -4,7 +4,7 @@
       title="查看详情"
       :list="list"
       @init="init"
-      @searchData="init"
+      @searchData="search"
       :logList="logList"
       @selectTable="selectTable"
       @changePage="changePage"
@@ -114,134 +114,44 @@ export default {
     };
   },
   created() {
-    this.axios("/api/procedure_index").then(
-      (res) => (this.produces = res.data.data)
-    );
-    this.axios("/api/employee_list").then((res) => (this.users = res.data));
+    // this.axios("/api/procedure_index").then(
+    //   (res) => (this.produces = res.data.data)
+    // );
+    // this.axios("/api/employee_list").then((res) => (this.users = res.data));
   },
   computed: {
     list() {
-      const array = [
+    return  [
         {
-          title: "楼幢",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "house",
-          optionName: "title",
-          optionValue: "id",
-          option: this.house_list,
-        },
-        {
-          title: "单元",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "unit",
-          optionName: "title",
-          optionValue: "id",
-          option: this.unit_list,
-        },
-        {
-          title: "楼层",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "level",
-          optionName: "title",
-          optionValue: "id",
-          option: this.level_list,
-        },
-        {
-          title: "房号",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "room",
-          optionName: "title",
-          optionValue: "id",
-          option: this.room_list,
-        },
-        {
-          title: "产品",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "product",
-          optionName: "title",
-          optionValue: "id",
-          option: this.product_list,
-        },
-        {
-          title: "部件",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "part",
-          optionName: "title",
-          optionValue: "id",
-          option: this.part_list,
-        },
-        {
-          title: "部件状态",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "part_state",
-          optionName: "title",
-          optionValue: "id",
-          option: this.part_state_list,
-        },
-        {
-          title: "图号",
-          filterable: true,
-          name: "Select",
-          value: "",
-          serverName: "url_number",
-          optionName: "title",
-          optionValue: "id",
-          option: this.url_number_list,
-        },
-        {
-          title: "部件是否贴标签",
+          title: "工序分类",
           filterable: true,
           name: "Select",
           value: "",
-          serverName: "part_label",
+          serverName: "basic_title",
           optionName: "title",
-          optionValue: "id",
-          option: this.part_label_list,
+          optionValue: "title",
+          option: this.produce_type_list,
         },
         {
-          title: "工序分类",
+          title: "工序",
           filterable: true,
           name: "Select",
           value: "",
-          serverName: "produce_type",
+          serverName: "procedure_title",
           optionName: "title",
-          optionValue: "id",
-          option: this.produce_type_list,
+          optionValue: "title",
+          option: this.produces,
         },
         {
-          title: "工序",
+          title: "班组",
           filterable: true,
           name: "Select",
           value: "",
-          serverName: "produce_id",
-          optionName: "title",
-          optionValue: "id",
-          option: this.produces,
+          optionName: "username",
+          optionValue: "title",
+          serverName: "title",
+          option: this.users,
         },
-        // {
-        //   title: "班组信息",
-        //   filterable: true,
-        //   name: "Select",
-        //   value: "",
-        //   optionName: "nickname",
-        //   optionValue: "id",
-        //   serverName: "user_id",
-        //   option: this.users,
-        // },
         {
           title: "完工状态",
           name: "Select",
@@ -252,28 +162,47 @@ export default {
             { label: "已完工", value: 3 },
           ],
         },
-        // {
-        //   title: "派工时间",
-        //   name: "Input",
-        //   start_server: "start_time",
-        //   end_server: "end_time",
-        //   start_value: "",
-        //   end_value: "",
-        //   isDate: true,
-        //   serverName: "id2",
-        //   start_placeholder: "开始日期",
-        //   end_placeholder: "结束日期",
-        // },
-      ];
-      return array;
+        {
+          title: "派工时间",
+          name: "Input",
+          start_server: "start_time",
+          end_server: "end_time",
+          start_value: "",
+          end_value: "",
+          isDate: true,
+          start_placeholder: "开始日期",
+          end_placeholder: "结束日期",
+        },
+      ]
+ 
     },
   },
   methods: {
+    search(row){
+           row.start_time = row.start_time?new Date(row.start_time).getTime().toString().split('').splice(0,10).join(''):'';
+      row.end_time =row.end_time? new Date(row.end_time).getTime().toString().split('').splice(0,10).join(''):'';
+       Object.assign(row, this.$route.query);
+        row.page_size = this.pageSize;
+      row.page_index = this.pageIndex;
+       this.axios("/api/orders_dispatch_produce_list", { params: row }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.tableData = res.data.list;
+            this.logList = res.data.detail;
+            this.total = res.data.total;
+          //  this.produce_type_list =res.data.basic_title;
+          //  this.produces = res.data.procedure_title;
+          //  this.users = res.data.username
+          }
+        }
+      );
+    },
     init(row) {
       this.pageIndex = 1;
       row.page_size = this.pageSize;
       row.page_index = this.pageIndex;
       Object.assign(row, this.$route.query);
+      
       this.getData(row);
     },
     back() {
@@ -288,6 +217,9 @@ export default {
             this.tableData = res.data.list;
             this.logList = res.data.detail;
             this.total = res.data.total;
+           this.produce_type_list =res.data.basic_title;
+           this.produces = res.data.procedure_title;
+           this.users = res.data.username
           }
         }
       );

+ 182 - 3
src/views/ProductionOrderList/Dispatchlist/details.vue

@@ -2,7 +2,9 @@
     <div>
         <FullPage 
         title='查看详情' 
-        :showTopSearch='false' 
+        :list='list'
+        @init="init"
+         @searchData="search"
         :logList='logList'
         @selectTable='selectTable'
         @changePage='changePage'
@@ -19,13 +21,19 @@
                 <Button @click="workoveragain(selectIds,2)" type="error" style="margin-right:10px;" ghost>批量返工</Button>
                 <Button @click="finish(selectIds,1)" type="success"  ghost>批量完成</Button>
             </div>
-
+    
             <template slot='set' slot-scope='{row}'>
                 <div>
                    <a v-if="row.sub_state<3" class="map-margin" style="color:#32C800" @click="finish(row,1)">完成</a>
                    <a class="map-margin" style="color:#ed4014" @click="workoveragain(row,1)">返工</a>
                 </div>
             </template>
+             <div  slot="text-list" class="nickname">
+                 <Button type="primary" style="margin-left:10px;" ghost size="small" @click="updata">修改班组</Button>
+           <Select v-model="nickname_list"  style="width:160px" size="small">
+           <Option v-for="item in username_list" :value="item.id" :key="item.value">{{ item.nickname }}</Option>
+          </Select>
+           </div>
         </FullPage>
         <div>
              <Modal
@@ -111,6 +119,8 @@ export default {
                 },
                 {title:'操作',align:'center',slot:'set',fixed:'right',width:'150'},
             ],
+            nickname_list:'',
+            username_list:[],
             tableData:[],
             pageIndex:1,
             pageSize:10,
@@ -121,12 +131,166 @@ export default {
             state:[],
             modal8:false,
             proxyObj:{...this.$route.query},
+             house_list:[],              //工序分类
+            unit_list:[],              //工序
+            room_list:[
+                {label:'已完工',value:'1'},
+                {label:'未完工',value:'0'}
+            ],             //完工状态
+            house:[],                //楼幢
+            unit:[],                //单元
+            storey:[],             //楼层
+            room_number:[],       //房号
+            produce:[],          //产品
+            parts:[],           //部件
+            tip_state:[
+                {label:'是',value:'1'},
+                {label:'否',value:'0'}
+            ],      //部件时候贴标签
         }
     },
+    computed:{
+           list() {
+      const array = [
+          {
+          title: "楼幢",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "house",
+          optionName: "house",
+          optionValue: "house",
+          option: this.house,
+        },
+        {
+          title: "单元",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "unit",
+          optionName: "unit",
+          optionValue: "unit",
+          option: this.unit,
+        },
+        {
+          title: "楼层",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "layer",
+          optionName: "layer",
+          optionValue: "layer",
+          option: this.storey,
+        },
+        {
+          title: "房号",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "number_detail",
+          optionName: "number",
+          optionValue: "number",
+          option: this.room_number,
+        },
+        {
+          title: "产品",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "product_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.produce,
+        },
+        {
+          title: "部件",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "part_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.parts,
+        },
+        {
+          title: "部件是否贴标签",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "label",
+          option: this.tip_state,
+        },
+        {
+          title: "工序分类",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "basic_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.house_list,
+        },
+        {
+          title: "工序",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "procedure_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.unit_list,
+        },
+        {
+          title: "完工状态",
+          filterable: true,
+          name: "Select",
+          value: '',
+          serverName: "state",
+          option: this.room_list,
+        }
+      ];
+      return array;
+    },
+    },
     mounted(){
         this.getData(this.$route.query)
+       this.axios("/api/employee_list").then((res) => {
+           console.log(res)
+           this.username_list = res.data})
     },
     methods:{
+        updata(){
+          if(this.selectIds == ''){
+              this.$Message.warning('请选择产品!')
+          }else{  this.axios.post('/api/orders_dispatch_username',{
+               id:this.selectIds,
+               user_id:this.nickname_list,
+               produce_id:this.$route.query.produce_id,
+               order_no:this.$route.query.order_no
+           })
+           this.getData(this.$route.query)}
+         
+        },
+        search(row){
+             row.page_size = this.pageSize
+            row.page_index = this.pageIndex
+             Object.assign(row, this.$route.query);
+            this.axios('/api/orders_dispatch_detail',{params:row}).then(res=>{
+                if(res.code == 200){
+                    console.log(res)
+                    this.tableData = res.data.list;
+                    this.logList = res.data.detail;
+                    this.total = res.data.total
+                }
+            })
+        },
+        init(row){
+this.pageIndex = 1;
+      row.page_size = this.pageSize;
+      row.page_index = this.pageIndex;
+      Object.assign(row, this.$route.query);
+      this.getData(row);
+        },
         onOk(){
              this.axios.post('/api/orders_plan_cancer',{
                  rework_reason:this.form_modal.rework_reason,
@@ -209,9 +373,19 @@ export default {
             row.page_index = this.pageIndex
             this.axios('/api/orders_dispatch_detail',{params:row}).then(res=>{
                 if(res.code == 200){
+                    console.log(res)
                     this.tableData = res.data.list;
                     this.logList = res.data.detail;
                     this.total = res.data.total
+                     this.produce_id = res.data.produce_id;
+                    this.house = res.data.house;
+                    this.unit = res.data.unit;
+                    this.storey = res.data.layer
+                    this.room_number = res.data.number_detail
+                    this.produce = res.data.product_title
+                    this.parts = res.data.part_title
+                    this.house_list = res.data.basic_title
+                    this.unit_list = res.data.procedure_title
                 }
             })
         },
@@ -253,7 +427,6 @@ export default {
             this.tag = tag;
             this.procedure_id = procedure_id
             this.state = state 
-           console.log(this.state)
         },
         changePage(e){
             this.pageIndex = e;
@@ -294,5 +467,11 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.nickname{
+    display: flex;
+    flex-direction: row-reverse;
+    margin-right: 10px;
+    margin-bottom: 6px;
+}
 .log-list{display: flex;flex-wrap:wrap;padding:10px 0;}
 </style>

+ 1 - 1
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -412,7 +412,7 @@ export default {
           title: "图号",
           align: "center",
           key: "url_number",
-          minWidth: 390,
+          minWidth: 100,
         },
         {
           title: "位置",

+ 154 - 3
src/views/ProductionOrderList/workOver/confirm.vue

@@ -2,8 +2,10 @@
     <div>
         <FullPage 
         title='查看详情' 
-        :showTopSearch='false' 
+        :list='list'
         :logList='logList'
+        @init="init"
+         @searchData="search"
         @selectTable='selectTable'
         @changePage='changePage'
         @changeSize='changeSize'
@@ -67,7 +69,7 @@ export default {
                 {title:'单位',align:'center',minWidth:100,key:'company'},
                 {title:'芯片编号',align:'center',minWidth:150,key:'chip'},
                 {title:'完工状态',align:'center',minWidth:100,
-                    render:(h,params)=>h('span',{},params.row.sub_state == 3 ? '已完工' : '未完工')
+                    render:(h,params)=>h('span',{},params.row.state == 1 ? '已完工' : '未完工')
                 },
                  {title:'返工原因',align:'center',minWidth:150,key:'rework_reason'},
                 {title:'操作',align:'center',slot:'set',fixed:'right',width:'150'},
@@ -82,12 +84,152 @@ export default {
             id:[],
             modal8:false,
             proxyObj:{...this.$route.query},
+            house_list:[],              //工序分类
+            unit_list:[],              //工序
+            room_list:[
+                {label:'已完工',value:'1'},
+                {label:'未完工',value:'0'}
+            ],             //完工状态
+            house:[],                //楼幢
+            unit:[],                //单元
+            storey:[],             //楼层
+            room_number:[],       //房号
+            produce:[],          //产品
+            parts:[],           //部件
+            tip_state:[
+                {label:'是',value:'1'},
+                {label:'否',value:'0'}
+            ],      //部件时候贴标签
         }
     },
+    computed:{
+       list() {
+      const array = [
+          {
+          title: "楼幢",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "house",
+          optionName: "house",
+          optionValue: "house",
+          option: this.house,
+        },
+        {
+          title: "单元",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "unit",
+          optionName: "unit",
+          optionValue: "unit",
+          option: this.unit,
+        },
+        {
+          title: "楼层",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "layer",
+          optionName: "layer",
+          optionValue: "layer",
+          option: this.storey,
+        },
+        {
+          title: "房号",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "number_detail",
+          optionName: "number",
+          optionValue: "number",
+          option: this.room_number,
+        },
+        {
+          title: "产品",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "product_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.produce,
+        },
+        {
+          title: "部件",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "part_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.parts,
+        },
+        {
+          title: "部件是否贴标签",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "label",
+          option: this.tip_state,
+        },
+        {
+          title: "工序分类",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "basic_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.house_list,
+        },
+        {
+          title: "工序",
+          filterable: true,
+          name: "Select",
+          value: "",
+          serverName: "procedure_title",
+          optionName: "title",
+          optionValue: "title",
+          option: this.unit_list,
+        },
+        {
+          title: "完工状态",
+          filterable: true,
+          name: "Select",
+          value: '',
+          serverName: "state",
+          option: this.room_list,
+        }
+      ];
+      return array;
+    },
+    },
     mounted(){
         this.getData(this.$route.query)
     },
     methods:{
+      search(row){
+        console.log(row)
+             row.page_size = this.pageSize
+            row.page_index = this.pageIndex
+             Object.assign(row, this.$route.query);
+            this.axios('/api/orders_rework_detail',{params:row}).then(res=>{
+                if(res.code == 200){
+                    console.log(res)
+                    this.tableData = res.data.list;
+                    this.logList = res.data.detail;
+                    this.total = res.data.total
+                }
+            })
+        },
+        init(row){
+          this.pageIndex = 1;
+      row.page_size = this.pageSize;
+      row.page_index = this.pageIndex;
+      Object.assign(row, this.$route.query);
+      this.getData(row);
+        },
        del(row,type){
       switch(type){
         case 1:
@@ -148,10 +290,19 @@ export default {
             row.page_index = this.pageIndex
             this.axios('/api/orders_rework_detail',{params:row}).then(res=>{
                 if(res.code == 200){
+                    console.log(res)
                     this.tableData = res.data.list;
                     this.logList = res.data.detail;
                     this.total = res.data.total;
-                    this.produce_id = res.data.produce_id
+                    this.produce_id = res.data.produce_id;
+                    this.house = res.data.house;
+                    this.unit = res.data.unit;
+                    this.storey = res.data.layer
+                    this.room_number = res.data.number_detail
+                    this.produce = res.data.product_title
+                    this.parts = res.data.part_title
+                    this.house_list = res.data.basic_title
+                    this.unit_list = res.data.procedure_title
                 }
             })
         },

+ 33 - 12
src/views/ProductionOrderList/workOver/details.vue

@@ -4,7 +4,7 @@
       title="查看详情"
       :list="list"
       @init="init"
-      @searchData="init"
+      @searchData="search"
       :logList="logList"
       @selectTable="selectTable"
       @changePage="changePage"
@@ -115,16 +115,13 @@ export default {
       total: 0,
       selectIds: [],
       proxyObj: { order_no: this.$route.query.order_no },
-      produces: [],
       users: [],
       house_list: [],
       unit_list: [],
       level_list: [],
       room_list: [ 
-        { label: '未完工', value: 0 },
-            { label: '已完工', value: 1 },
-            { label: '返工未完工', value: 2 },
-             { label: '返工已完工', value: 3 }
+        { label: '未完工', value: 2 },
+            { label: '已完工', value: 3 }
             ],
       product_list: [],
       part_list: [],
@@ -136,10 +133,11 @@ export default {
     };
   },
   created() {
-    this.axios("/api/procedure_index").then(
-      (res) => (this.produces = res.data.data)
-    );
-    this.axios("/api/employee_list").then((res) => (this.users = res.data));
+    // this.axios("/api/procedure_index").then(
+    //   (res) => {
+    //     this.unit_list = res.data.data}
+    // );
+    // this.axios("/api/employee_list").then((res) => (this.level_list = res.data));
   },
   computed: {
     list() {
@@ -169,7 +167,7 @@ export default {
           filterable: true,
           name: "Select",
           value: "",
-          serverName: "level",
+          serverName: "user_id",
           optionName: "title",
           optionValue: "id",
           option: this.level_list,
@@ -179,7 +177,7 @@ export default {
           filterable: true,
           name: "Select",
           value: '',
-          serverName: "room",
+          serverName: "state",
           option: this.room_list,
         },
         {
@@ -199,6 +197,25 @@ export default {
     },
   },
   methods: {
+    search(row){
+       row.start_time = row.start_time?new Date(row.start_time).getTime().toString().split('').splice(0,10).join(''):'';
+      row.end_time =row.end_time? new Date(row.end_time).getTime().toString().split('').splice(0,10).join(''):'';
+       Object.assign(row, this.$route.query);
+        row.page_size = this.pageSize;
+      row.page_index = this.pageIndex;
+       this.axios("/api/orders_rework_produce_list", { params: row }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.tableData = res.data.list;
+            this.logList = res.data.detail;
+            this.total = res.data.total;
+          //  this.produce_type_list =res.data.basic_title;
+          //  this.produces = res.data.procedure_title;
+          //  this.users = res.data.username
+          }
+        }
+      );
+    },
     del(row,type){
       switch(type){
         case 1:
@@ -261,9 +278,13 @@ export default {
       this.axios("/api/orders_rework_produce_list", { params: row }).then(
         (res) => {
           if (res.code == 200) {
+            console.log(res)
+            this.unit_list = res.data.procedure_title
+            this.house_list =res.data.basic_title
             this.tableData = res.data.list;
             this.logList = res.data.detail;
             this.total = res.data.total;
+            this.level_list = res.data.username
           }
         }
       );