lilei 3 years ago
parent
commit
92b263ecb2

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1658300863724
+  "version": 1658472429394
 }

+ 9 - 0
src/api/shelf.js

@@ -105,3 +105,12 @@ export const shelfPutOutDetailList = (params) => {
     method: 'post'
   })
 }
+
+// 修改完成标识
+export const modifFinishFlag = (params) => {
+  return axios({
+    url: `/shelf/modifFinishFlag `,
+    data: params,
+    method: 'post'
+  })
+}

+ 36 - 13
src/views/numsGoodsShelves/shelfSet/list.vue

@@ -35,7 +35,7 @@
       </div>
       <!-- 提示 -->
       <a-alert type="info" style="margin-bottom: 10px">
-        <div slot="message">注意:只有当数字货架的所有信息都设置完成,才能在其他功能中看到该数字货架</div>
+        <div slot="message">注意:只有当数字货架的“是否设置完成”为"是",系统才会自动对该货架生成补货单,修理厂才能正常下单。</div>
       </a-alert>
       <!-- 列表 -->
       <s-table
@@ -51,22 +51,28 @@
         bordered>
         <!-- 货位数量 -->
         <template slot="shelfPlaceNum" slot-scope="text, record">
-          <div v-if="record.finishFlag=='1'">{{ record.shelfPlaceNum }}</div>
-          <div v-else>
-            <p style="margin: 0;">
-              <span style="color: red;">{{ record.shelfPlaceBindNum||record.shelfPlaceBindNum==0 ? record.shelfPlaceBindNum:'' }}</span> /
-              {{ record.shelfPlaceNum }}
-            </p>
-          </div>
+          <p style="margin: 0;">
+            <span style="color: red;">
+              {{ record.shelfPlaceBindNum||record.shelfPlaceBindNum==0 ? record.shelfPlaceBindNum:'' }}</span> /
+            {{ record.shelfPlaceNum }}
+          </p>
         </template>
         <!-- 是否设置完成 -->
         <template slot="finishFlag" slot-scope="text, record">
-          <span v-if="record.finishFlagDictValue" :style="{color: record.finishFlagDictValue=='否' ? 'red':''}">{{ record.finishFlagDictValue }}</span>
-          <span v-else>--</span>
+          <a-switch
+            checkedChildren="是"
+            unCheckedChildren="否"
+            v-if="record.finishFlag!=undefined"
+            @change="changeStatus(record)"
+            :checked="record.finishFlag == 1"
+          />
+          <span v-else :style="{ color: record.finishFlag == 1 ? '#00aa00' : '#999' }">
+            {{ record.finishFlag == 1 ? '是' : (record.finishFlag!=undefined?'否':'--') }}
+          </span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">{{ record.finishFlag=='1'?'修改':'设置' }}</a-button>
+          <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">设置</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -81,7 +87,7 @@ import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import shelfSList from '@/views/common/shelfList'
 import basicInfoModal from './basicInfoModal.vue'
-import { shelfList } from '@/api/shelf'
+import { shelfList, modifFinishFlag } from '@/api/shelf'
 export default {
   components: { STable, VSelect, custList, shelfSList, basicInfoModal },
   mixins: [commonMixin],
@@ -104,7 +110,7 @@ export default {
         { title: '关联客户', dataIndex: 'customerEntity.customerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '货位数量', scopedSlots: { customRender: 'shelfPlaceNum' }, width: '15%', align: 'center' },
         { title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '20%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'left' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -154,6 +160,23 @@ export default {
         this.queryParam.customerSn = undefined
       }
     },
+    // 启用 禁用
+    changeStatus (record) {
+      const params = {
+        shelfSn: record.shelfSn,
+        finishFlag: record.finishFlag == 1 ? '0' : '1'
+      }
+      this.spinning = true
+      modifFinishFlag(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
     // 重置
     resetSearchForm () {
       this.queryParam.shelfSn = undefined

+ 1 - 1
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -47,7 +47,7 @@
           </a-form>
         </div>
         <!-- 操作按钮 -->
-        <div class="table-operator" v-if="basicInfoData&&basicInfoData.finishFlag=='0'">
+        <div class="table-operator">
           <a-button id="shelfSet-import" type="primary" class="button-error" @click="openGuideModal=true">导入绑定产品</a-button>
           <a-tooltip placement="top">
             <template slot="title">

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.215:8076/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.215:8076/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,