|
|
@@ -24,7 +24,7 @@
|
|
|
>本地</view>
|
|
|
|
|
|
<view class="store_name">
|
|
|
- <view class="store_title">
|
|
|
+ <view class="store_title" @click.stop="nameModify(item)">
|
|
|
{{item.name}}
|
|
|
</view>
|
|
|
<view class="accumulative"></view>
|
|
|
@@ -57,17 +57,34 @@
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <modal-module :show="modifyGhsShow" @click="modifyConfirm" :maskClosable="true" title="修改名称" padding="30rpx 30rpx" >
|
|
|
+ <template v-slot:content>
|
|
|
+ <div class="app-modal-input-wrap">
|
|
|
+ <div class="inp-list-line">
|
|
|
+ <div class="line-input">
|
|
|
+ <input type="number" ref="input" style="width:90%;text-align:center;" v-model="modifyGhsName" :adjust-position="false" class="inp-input" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import Tabs from "@/components/plugin/tabs";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-import { getList } from "@/api/ghs";
|
|
|
+import { getList,changeGhsName } from "@/api/ghs";
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
+import ModalModule from "@/components/plugin/modal"
|
|
|
export default {
|
|
|
- components: { AppWrapperEmpty, AppSearchModule,Tabs },
|
|
|
+ components: { AppWrapperEmpty, AppSearchModule,Tabs,ModalModule },
|
|
|
data () {
|
|
|
return {
|
|
|
+ modifyGhsId:0,
|
|
|
+ modifyGhsName:'',
|
|
|
+ modifyGhsShow:false,
|
|
|
list: {
|
|
|
data: []
|
|
|
},
|
|
|
@@ -90,12 +107,13 @@ export default {
|
|
|
value: "0"
|
|
|
}
|
|
|
],
|
|
|
- info:{}
|
|
|
+ info:{},
|
|
|
+ search:''
|
|
|
}
|
|
|
},
|
|
|
onShow(){
|
|
|
uni.removeStorageSync('newGhs')
|
|
|
- this.getGHSList('')
|
|
|
+ this.getGHSList()
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
this.getGHSList().then(res => {
|
|
|
@@ -103,6 +121,29 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ modifyConfirm(val){
|
|
|
+ let that=this;
|
|
|
+ if (val.index == 0) {
|
|
|
+ this.modifyGhsId = 0
|
|
|
+ this.modifyGhsName = ''
|
|
|
+ this.modifyGhsShow = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ changeGhsName({id:this.modifyGhsId,name:this.modifyGhsName}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ that.modifyGhsId = 0
|
|
|
+ that.modifyGhsName = ''
|
|
|
+ that.modifyGhsShow = false
|
|
|
+ that.init()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ nameModify(ghs){
|
|
|
+ this.modifyGhsId = ghs.id ? ghs.id : 0
|
|
|
+ this.modifyGhsName = ghs.name ? ghs.name : ''
|
|
|
+ this.modifyGhsShow = true
|
|
|
+ },
|
|
|
cgList(item){
|
|
|
if(item.location && item.location == 1){
|
|
|
this.pageTo({url:'/pagesPurchase/wcOrder?ghsId='+item.id})
|
|
|
@@ -116,7 +157,7 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
this.tabIndex = index;
|
|
|
- this.getGHSList('')
|
|
|
+ this.getGHSList()
|
|
|
},
|
|
|
addGhs(){
|
|
|
this.pageTo({url:'/pagesPurchase/suppAdd'})
|
|
|
@@ -128,13 +169,15 @@ export default {
|
|
|
//this.pageTo({ url: '/pagesPurchase/gathering?id='+item.id})
|
|
|
},
|
|
|
init() {
|
|
|
- this.getGHSList('')
|
|
|
+ this.getGHSList()
|
|
|
},
|
|
|
searchFn(e) {
|
|
|
- this.getGHSList(e)
|
|
|
+ this.search = e
|
|
|
+ this.getGHSList()
|
|
|
},
|
|
|
- getGHSList (name) {
|
|
|
+ getGHSList() {
|
|
|
let location = this.tabs[this.tabIndex].key
|
|
|
+ let name = this.search
|
|
|
return getList({ pageSize:300, name:name,location:location }).then(res => {
|
|
|
this.supplierList = res.data.list
|
|
|
this.info = res.data
|
|
|
@@ -147,7 +190,7 @@ export default {
|
|
|
this.pageTo({url: '/pagesGys/details?id='+item.id})
|
|
|
},
|
|
|
goToCg (item) {
|
|
|
- this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name+'&location='+item.location,type:2})
|
|
|
+ this.pageTo({url: '/pagesPurchase/add?ghsId='+item.id+'&ghsName='+item.name+'&location='+item.location})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -252,15 +295,13 @@ export default {
|
|
|
float:left;
|
|
|
}
|
|
|
& > .store_title {
|
|
|
- margin-bottom: 58upx;
|
|
|
- margin-left:10upx;
|
|
|
- width: 400upx;
|
|
|
+ margin-bottom:58upx;
|
|
|
+ margin-left:0upx;
|
|
|
+ width: 420upx;
|
|
|
white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
- overflow: hidden;
|
|
|
word-break: break-all;
|
|
|
- font-size: 34upx;
|
|
|
- font-weight: 700;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight:700;
|
|
|
color: #333;
|
|
|
display:inline-block;
|
|
|
}
|