ysy 1 год назад
Родитель
Сommit
e9409ee631
2 измененных файлов с 13 добавлено и 4 удалено
  1. 3 3
      src/api/workOrder/index.js
  2. 10 1
      src/views/workOrder/index.vue

+ 3 - 3
src/api/workOrder/index.js

@@ -14,9 +14,9 @@ export async function getList(params) {
 }
 
 // 下达
-export async function releaseWorkOrder({ id, teamId }) {
-  const res = await request.get(
-    `/aps/workorder/releaseWorkOrder/${id}/${teamId}`
+export async function releaseWorkOrder(data) {
+  const res = await request.post(
+    `/aps/workorder/releaseWorkOrder`, data
   );
   if (res.data.code == 0) {
     return res.data.data;

+ 10 - 1
src/views/workOrder/index.vue

@@ -80,6 +80,11 @@
         ></el-option>
       </el-select>
 
+      <el-radio-group v-model="singleReport" style="margin-top: 16px;">
+        <el-radio :label="1">单件报工</el-radio>
+        <el-radio :label="0">批量报工</el-radio>
+      </el-radio-group>
+
       <div class="footer" slot="footer">
         <el-button @click="visible = false">取消</el-button>
         <el-button type="primary" @click="confirm">确定</el-button>
@@ -112,6 +117,8 @@
           teamId: '',
           id: ''
         },
+
+        singleReport: 1,
         teamList: [],
 
         statusOpt: [
@@ -343,7 +350,9 @@
         const loading = this.$loading({ text: '加载中...' });
         releaseWorkOrder({
           id: this.current.id,
-          teamId: this.releasParams.teamId
+          teamId: this.releasParams.teamId,
+          singleReport: this.singleReport,
+          singleReportId: this.singleReportId
         })
           .then((res) => {
             if (res) {