|
@@ -108,6 +108,7 @@
|
|
|
</a-upload>
|
|
|
<a-button type="primary" @click="synchronization" icon="reload">同步</a-button>
|
|
|
<a-button type="primary" icon="download" @click="majorityDelet">批量删除</a-button>
|
|
|
+ <a-button type="primary" icon="download" @click="majorityPush">批量推送</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 子表 :scroll="{ x: 1500 }" 内容少 无需滚动-->
|
|
@@ -139,6 +140,8 @@
|
|
|
<a-tag color="orange" v-if="record.pushState == '0'">未推送</a-tag>
|
|
|
<a-tag color="red" v-if="record.pushState == '2'">推送失败</a-tag>
|
|
|
<a-tag color="green" v-if="record.pushState == '1'">推送成功</a-tag>
|
|
|
+ <a-tag color="green" v-if="record.pushState == '3'">推送中</a-tag>
|
|
|
+ <a-tag color="green" v-if="record.pushState == '4'">不再推送</a-tag>
|
|
|
</span>
|
|
|
|
|
|
<span slot="whetherCloudFactoryPush" slot-scope="text, record" :title ="record.cause">
|
|
@@ -163,7 +166,8 @@
|
|
|
<a-menu slot="overlay" v-if="record.status=='0'">
|
|
|
<a-menu-item><a @click="details(record)">详情</a></a-menu-item>
|
|
|
<a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
|
|
|
- <a-menu-item><a @click="pushU8(record)">推送U8</a></a-menu-item>
|
|
|
+ <a-menu-item v-if="record.pushState!=='4'"><a @click="pushU8(record)">推送U8</a></a-menu-item>
|
|
|
+ <a-menu-item v-if="record.pushState!=='4'"><a @click="stopPush(record)">关闭推送</a></a-menu-item>
|
|
|
<!-- <a-menu-item><a @click="itemXls(record)">导出</a></a-menu-item> -->
|
|
|
<!-- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item> -->
|
|
|
<a-menu-item>
|
|
@@ -175,7 +179,8 @@
|
|
|
<!-- 已提交 -->
|
|
|
<a-menu slot="overlay" v-if="record.status=='1'">
|
|
|
<a-menu-item><a @click="details(record)">详情</a></a-menu-item>
|
|
|
- <a-menu-item><a @click="pushU8(record)">推送U8</a></a-menu-item>
|
|
|
+ <a-menu-item v-if="record.pushState!=='4'"><a @click="pushU8(record)">推送U8</a></a-menu-item>
|
|
|
+ <a-menu-item v-if="record.pushState!=='4'"><a @click="stopPush(record)">关闭推送</a></a-menu-item>
|
|
|
<!-- <a-menu-item><a @click="itemXls(record)">导出</a></a-menu-item> -->
|
|
|
<!-- <a-menu-item><a @click="cancel(record)">取消提交</a></a-menu-item> -->
|
|
|
</a-menu>
|
|
@@ -215,7 +220,7 @@ import moment from 'moment'
|
|
|
import addFabricDrawer from '@views/packing-list/packinglist-fabrics/addFabricDrawer.vue'
|
|
|
import detailsFabricDrawer from '@views/packing-list/packinglist-fabrics/detailsFabricDrawer.vue'
|
|
|
import editFabricDrawer from '@views/packing-list/packinglist-fabrics/editFabricDrawer.vue'
|
|
|
-import { fabricList,fabricListId,deleteFabricList,submitList,batchDelete,cancelSubmit,bitchSubmit,bitchCancelSubmit,synchronizationData,upload,fileDetail,pushOrderData} from '@api/document/packing-list/packinglist-fabrics'
|
|
|
+import {bitchPush,cancelPush,fabricList,fabricListId,deleteFabricList,submitList,batchDelete,cancelSubmit,bitchSubmit,bitchCancelSubmit,synchronizationData,upload,fileDetail,pushOrderData} from '@api/document/packing-list/packinglist-fabrics'
|
|
|
|
|
|
export default {
|
|
|
name: 'FabricList', // 装箱单-面料
|
|
@@ -435,6 +440,7 @@ export default {
|
|
|
current: res.result.current,
|
|
|
pageSize: res.result.size
|
|
|
}
|
|
|
+ this.$forceUpdate()
|
|
|
}else{
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
@@ -637,6 +643,7 @@ export default {
|
|
|
pushU8(record){
|
|
|
pushOrderData({ids : record.id}).then(res =>{
|
|
|
if (res.success) {
|
|
|
+ this.getFabricList()
|
|
|
this.$message.success('推送U8成功');
|
|
|
}else{
|
|
|
this.$message.error(res.message);
|
|
@@ -644,6 +651,17 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ stopPush(record){
|
|
|
+ cancelPush({id : record.id}).then(res =>{
|
|
|
+ if (res.success) {
|
|
|
+ this.getFabricList()
|
|
|
+ this.$message.success('关闭推送成功');
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
cancel(record){
|
|
|
console.log(record.id)
|
|
|
cancelSubmit({id:record.id}).then(res =>{
|
|
@@ -678,6 +696,29 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ //批量推送
|
|
|
+ majorityPush(){
|
|
|
+ var ids = this.selectedRowKeys.toString()
|
|
|
+ bitchPush({ids : ids}).then(res =>{
|
|
|
+ this.fabricListData.map(item=>{
|
|
|
+ this.selectedRowKeys.map(event=>{
|
|
|
+ if(item.id==event){
|
|
|
+ item.pushState = '3'
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if (res.success) {
|
|
|
+ this.getFabricList()
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.$message.success('推送成功');
|
|
|
+ }else{
|
|
|
+ this.getFabricList()
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
//批量取消推送
|
|
|
bitchCancelSubmitList(){
|
|
|
for(var i =0;i<this.selectedRows.length;i++){
|